#[repr(C)]pub struct PyGetSetDef {
pub name: *const c_char,
pub get: Option<getter>,
pub set: Option<setter>,
pub doc: *const c_char,
pub closure: *mut c_void,
}
Expand description
Represents the PyGetSetDef structure.
Note that CPython may leave fields uninitialized. You must ensure that
name
!= NULL before dereferencing or reading other fields.
Fields§
§name: *const c_char
§get: Option<getter>
§set: Option<setter>
§doc: *const c_char
§closure: *mut c_void
Trait Implementations§
Source§impl Clone for PyGetSetDef
impl Clone for PyGetSetDef
Source§fn clone(&self) -> PyGetSetDef
fn clone(&self) -> PyGetSetDef
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PyGetSetDef
impl Debug for PyGetSetDef
Source§impl Default for PyGetSetDef
impl Default for PyGetSetDef
Source§fn default() -> PyGetSetDef
fn default() -> PyGetSetDef
Returns the “default value” for a type. Read more
Source§impl PartialEq for PyGetSetDef
impl PartialEq for PyGetSetDef
impl Copy for PyGetSetDef
impl Eq for PyGetSetDef
impl StructuralPartialEq for PyGetSetDef
Auto Trait Implementations§
impl Freeze for PyGetSetDef
impl RefUnwindSafe for PyGetSetDef
impl !Send for PyGetSetDef
impl !Sync for PyGetSetDef
impl Unpin for PyGetSetDef
impl UnwindSafe for PyGetSetDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)