Skip to content

Commit 2a69367

Browse files
committed
Mark protocols setters as doc(hidden)
1 parent f7fa008 commit 2a69367

File tree

9 files changed

+12
-1
lines changed

9 files changed

+12
-1
lines changed

src/class/basic.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ pub struct PyObjectMethods {
153153
pub nb_bool: Option<ffi::inquiry>,
154154
}
155155

156+
#[doc(hidden)]
156157
impl PyObjectMethods {
157158
pub(crate) fn update_typeobj(&self, type_object: &mut ffi::PyTypeObject) {
158159
type_object.tp_str = self.tp_str;
@@ -162,7 +163,7 @@ impl PyObjectMethods {
162163
type_object.tp_richcompare = self.tp_richcompare;
163164
type_object.tp_setattro = self.tp_setattro;
164165
}
165-
166+
// Set functions used by `#[pyproto]`.
166167
pub fn set_str<T>(&mut self)
167168
where
168169
T: for<'p> PyObjectStrProtocol<'p>,

src/class/buffer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ pub trait PyBufferReleaseBufferProtocol<'p>: PyBufferProtocol<'p> {
4040
type Result: Into<PyResult<()>>;
4141
}
4242

43+
/// Set functions used by `#[pyproto]`.
44+
#[doc(hidden)]
4345
impl PyBufferProcs {
4446
pub fn set_getbuffer<T>(&mut self)
4547
where

src/class/descr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ pub trait PyDescrSetNameProtocol<'p>: PyDescrProtocol<'p> {
7171
type Result: Into<PyResult<()>>;
7272
}
7373

74+
/// All FFI functions for description protocols.
7475
#[derive(Default)]
7576
pub struct PyDescrMethods {
7677
pub tp_descr_get: Option<ffi::descrgetfunc>,
7778
pub tp_descr_set: Option<ffi::descrsetfunc>,
7879
}
7980

81+
#[doc(hidden)]
8082
impl PyDescrMethods {
8183
pub(crate) fn update_typeobj(&self, type_object: &mut ffi::PyTypeObject) {
8284
type_object.tp_descr_get = self.tp_descr_get;

src/class/gc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub struct PyGCMethods {
2525
pub tp_clear: Option<ffi::inquiry>,
2626
}
2727

28+
#[doc(hidden)]
2829
impl PyGCMethods {
2930
pub(crate) fn update_typeobj(&self, type_object: &mut ffi::PyTypeObject) {
3031
type_object.tp_traverse = self.tp_traverse;

src/class/iter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pub struct PyIterMethods {
4646
pub tp_iternext: Option<ffi::iternextfunc>,
4747
}
4848

49+
#[doc(hidden)]
4950
impl PyIterMethods {
5051
pub(crate) fn update_typeobj(&self, type_object: &mut ffi::PyTypeObject) {
5152
type_object.tp_iter = self.tp_iter;

src/class/mapping.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ pub trait PyMappingReversedProtocol<'p>: PyMappingProtocol<'p> {
7474
type Result: Into<PyResult<Self::Success>>;
7575
}
7676

77+
#[doc(hidden)]
7778
impl ffi::PyMappingMethods {
7879
pub fn set_length<T>(&mut self)
7980
where

src/class/number.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ pub trait PyNumberIndexProtocol<'p>: PyNumberProtocol<'p> {
615615
type Result: Into<PyResult<Self::Success>>;
616616
}
617617

618+
#[doc(hidden)]
618619
impl ffi::PyNumberMethods {
619620
pub(crate) fn from_nb_bool(nb_bool: ffi::inquiry) -> *mut Self {
620621
let mut nm = ffi::PyNumberMethods_INIT;

src/class/pyasync.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ pub trait PyAsyncAexitProtocol<'p>: PyAsyncProtocol<'p> {
8989
type Result: Into<PyResult<Self::Success>>;
9090
}
9191

92+
#[doc(hidden)]
9293
impl ffi::PyAsyncMethods {
9394
pub fn set_await<T>(&mut self)
9495
where

src/class/sequence.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ pub trait PySequenceInplaceRepeatProtocol<'p>: PySequenceProtocol<'p> + IntoPy<P
126126
type Result: Into<PyResult<Self>>;
127127
}
128128

129+
#[doc(hidden)]
129130
impl ffi::PySequenceMethods {
130131
pub fn set_len<T>(&mut self)
131132
where

0 commit comments

Comments
 (0)