pub struct ClassProperity { /* private fields */ }
Expand description

Representation of class property(getters,setters) not a class field!

Implementations§

source§

impl ClassProperity

source

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.

source

pub fn get_ptr(&self) -> *mut MonoProperty

source

pub unsafe fn get( &self, obj: Option<Object>, params: &[*mut c_void] ) -> Result<Option<Object>, Exception>

Gets value of property self of object(pass None if static), with parmateres params(only for Indexers,otherwise pass empty vec)

Safety

Pointers in params must be a valid.

Errors

Returns an exception if it was thrown by managed code.

source

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.

source

pub fn get_get_method<T: InteropSend + InteropClass>( &self ) -> Option<Method<(T,)>>

Gets getter method of this property.

source

pub fn get_set_method<T: InteropSend + CompareClasses>( &self ) -> Option<Method<T>>where <T as InteropSend>::TargetType: TupleToPtrs,

Gets setter method of this property.

source

pub fn get_parent(&self) -> Class

Gets class this property is attached to.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.