Mark protocols setters as doc(hidden)
This commit is contained in:
parent
f7fa008159
commit
2a69367888
|
@ -153,6 +153,7 @@ pub struct PyObjectMethods {
|
||||||
pub nb_bool: Option<ffi::inquiry>,
|
pub nb_bool: Option<ffi::inquiry>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
impl PyObjectMethods {
|
impl PyObjectMethods {
|
||||||
pub(crate) fn update_typeobj(&self, type_object: &mut ffi::PyTypeObject) {
|
pub(crate) fn update_typeobj(&self, type_object: &mut ffi::PyTypeObject) {
|
||||||
type_object.tp_str = self.tp_str;
|
type_object.tp_str = self.tp_str;
|
||||||
|
@ -162,7 +163,7 @@ impl PyObjectMethods {
|
||||||
type_object.tp_richcompare = self.tp_richcompare;
|
type_object.tp_richcompare = self.tp_richcompare;
|
||||||
type_object.tp_setattro = self.tp_setattro;
|
type_object.tp_setattro = self.tp_setattro;
|
||||||
}
|
}
|
||||||
|
// Set functions used by `#[pyproto]`.
|
||||||
pub fn set_str<T>(&mut self)
|
pub fn set_str<T>(&mut self)
|
||||||
where
|
where
|
||||||
T: for<'p> PyObjectStrProtocol<'p>,
|
T: for<'p> PyObjectStrProtocol<'p>,
|
||||||
|
|
|
@ -40,6 +40,8 @@ pub trait PyBufferReleaseBufferProtocol<'p>: PyBufferProtocol<'p> {
|
||||||
type Result: Into<PyResult<()>>;
|
type Result: Into<PyResult<()>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Set functions used by `#[pyproto]`.
|
||||||
|
#[doc(hidden)]
|
||||||
impl PyBufferProcs {
|
impl PyBufferProcs {
|
||||||
pub fn set_getbuffer<T>(&mut self)
|
pub fn set_getbuffer<T>(&mut self)
|
||||||
where
|
where
|
||||||
|
|
|
@ -71,12 +71,14 @@ pub trait PyDescrSetNameProtocol<'p>: PyDescrProtocol<'p> {
|
||||||
type Result: Into<PyResult<()>>;
|
type Result: Into<PyResult<()>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// All FFI functions for description protocols.
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct PyDescrMethods {
|
pub struct PyDescrMethods {
|
||||||
pub tp_descr_get: Option<ffi::descrgetfunc>,
|
pub tp_descr_get: Option<ffi::descrgetfunc>,
|
||||||
pub tp_descr_set: Option<ffi::descrsetfunc>,
|
pub tp_descr_set: Option<ffi::descrsetfunc>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
impl PyDescrMethods {
|
impl PyDescrMethods {
|
||||||
pub(crate) fn update_typeobj(&self, type_object: &mut ffi::PyTypeObject) {
|
pub(crate) fn update_typeobj(&self, type_object: &mut ffi::PyTypeObject) {
|
||||||
type_object.tp_descr_get = self.tp_descr_get;
|
type_object.tp_descr_get = self.tp_descr_get;
|
||||||
|
|
|
@ -25,6 +25,7 @@ pub struct PyGCMethods {
|
||||||
pub tp_clear: Option<ffi::inquiry>,
|
pub tp_clear: Option<ffi::inquiry>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
impl PyGCMethods {
|
impl PyGCMethods {
|
||||||
pub(crate) fn update_typeobj(&self, type_object: &mut ffi::PyTypeObject) {
|
pub(crate) fn update_typeobj(&self, type_object: &mut ffi::PyTypeObject) {
|
||||||
type_object.tp_traverse = self.tp_traverse;
|
type_object.tp_traverse = self.tp_traverse;
|
||||||
|
|
|
@ -46,6 +46,7 @@ pub struct PyIterMethods {
|
||||||
pub tp_iternext: Option<ffi::iternextfunc>,
|
pub tp_iternext: Option<ffi::iternextfunc>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
impl PyIterMethods {
|
impl PyIterMethods {
|
||||||
pub(crate) fn update_typeobj(&self, type_object: &mut ffi::PyTypeObject) {
|
pub(crate) fn update_typeobj(&self, type_object: &mut ffi::PyTypeObject) {
|
||||||
type_object.tp_iter = self.tp_iter;
|
type_object.tp_iter = self.tp_iter;
|
||||||
|
|
|
@ -74,6 +74,7 @@ pub trait PyMappingReversedProtocol<'p>: PyMappingProtocol<'p> {
|
||||||
type Result: Into<PyResult<Self::Success>>;
|
type Result: Into<PyResult<Self::Success>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
impl ffi::PyMappingMethods {
|
impl ffi::PyMappingMethods {
|
||||||
pub fn set_length<T>(&mut self)
|
pub fn set_length<T>(&mut self)
|
||||||
where
|
where
|
||||||
|
|
|
@ -615,6 +615,7 @@ pub trait PyNumberIndexProtocol<'p>: PyNumberProtocol<'p> {
|
||||||
type Result: Into<PyResult<Self::Success>>;
|
type Result: Into<PyResult<Self::Success>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
impl ffi::PyNumberMethods {
|
impl ffi::PyNumberMethods {
|
||||||
pub(crate) fn from_nb_bool(nb_bool: ffi::inquiry) -> *mut Self {
|
pub(crate) fn from_nb_bool(nb_bool: ffi::inquiry) -> *mut Self {
|
||||||
let mut nm = ffi::PyNumberMethods_INIT;
|
let mut nm = ffi::PyNumberMethods_INIT;
|
||||||
|
|
|
@ -89,6 +89,7 @@ pub trait PyAsyncAexitProtocol<'p>: PyAsyncProtocol<'p> {
|
||||||
type Result: Into<PyResult<Self::Success>>;
|
type Result: Into<PyResult<Self::Success>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
impl ffi::PyAsyncMethods {
|
impl ffi::PyAsyncMethods {
|
||||||
pub fn set_await<T>(&mut self)
|
pub fn set_await<T>(&mut self)
|
||||||
where
|
where
|
||||||
|
|
|
@ -126,6 +126,7 @@ pub trait PySequenceInplaceRepeatProtocol<'p>: PySequenceProtocol<'p> + IntoPy<P
|
||||||
type Result: Into<PyResult<Self>>;
|
type Result: Into<PyResult<Self>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
impl ffi::PySequenceMethods {
|
impl ffi::PySequenceMethods {
|
||||||
pub fn set_len<T>(&mut self)
|
pub fn set_len<T>(&mut self)
|
||||||
where
|
where
|
||||||
|
|
Loading…
Reference in a new issue