Struct wrapped_mono::ClassProperity
source · pub struct ClassProperity { /* private fields */ }
Expand description
Representation of class property(getters,setters) not a class field!
Implementations§
source§impl ClassProperity
impl ClassProperity
sourcepub unsafe fn from_ptr(ptr: *mut MonoProperty) -> Option<Self>
pub unsafe fn from_ptr(ptr: *mut MonoProperty) -> Option<Self>
Creates new ClassProperity
from a *mut [MonoProperty
].
Safety
The ptr must be either null or a valid pointer to *mut [MonoProperty
] or null.
pub fn get_ptr(&self) -> *mut MonoProperty
sourcepub unsafe fn get(
&self,
obj: Option<Object>,
params: &[*mut c_void]
) -> Result<Option<Object>, Exception>
pub unsafe fn get( &self, obj: Option<Object>, params: &[*mut c_void] ) -> Result<Option<Object>, Exception>
sourcepub unsafe fn set(
&self,
obj: Option<Object>,
params: &[*mut c_void]
) -> Result<(), Exception>
pub unsafe fn set( &self, obj: Option<Object>, params: &[*mut c_void] ) -> Result<(), Exception>
Sets value of property self of object(pass None
if static), with value at beginning of params, and pass any other arguments after it(only for Indexers,otherwise pass only the set value)
Pointers in params must be a valid.
Safety
Params must be a list of valid pointers and must match arguments of set method.
Errors
Returns an exception if it was thrown by managed code.
sourcepub fn get_get_method<T: InteropSend + InteropClass>(
&self
) -> Option<Method<(T,)>>
pub fn get_get_method<T: InteropSend + InteropClass>( &self ) -> Option<Method<(T,)>>
Gets getter method of this property.
sourcepub fn get_set_method<T: InteropSend + CompareClasses>(
&self
) -> Option<Method<T>>where
<T as InteropSend>::TargetType: TupleToPtrs,
pub fn get_set_method<T: InteropSend + CompareClasses>( &self ) -> Option<Method<T>>where <T as InteropSend>::TargetType: TupleToPtrs,
Gets setter method of this property.
sourcepub fn get_parent(&self) -> Class
pub fn get_parent(&self) -> Class
Gets class this property is attached to.
Auto Trait Implementations§
impl RefUnwindSafe for ClassProperity
impl !Send for ClassProperity
impl !Sync for ClassProperity
impl Unpin for ClassProperity
impl UnwindSafe for ClassProperity
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