Struct wrapped_mono::reflection_type::ReflectionType
source · pub struct ReflectionType { /* private fields */ }
Expand description
Rust representation of managed object derived form class System.Type
Implementations§
source§impl ReflectionType
impl ReflectionType
sourcepub fn from_class(class: &Class) -> Self
pub fn from_class(class: &Class) -> Self
Converts a class to a [MonoReflectionType
]
sourcepub fn get_type_ptr(&self) -> *mut MonoType
pub fn get_type_ptr(&self) -> *mut MonoType
Returns a pointer to unmanaged representation of System.Type
sourcepub unsafe fn from_type_ptr(type_ptr: *mut MonoType) -> Option<Self>
pub unsafe fn from_type_ptr(type_ptr: *mut MonoType) -> Option<Self>
Creates an new instance from a pointer to unmanaged representation of System.Type
Safety
The pointer must be either a pointer to valid *mut [MonoType
] or null.
Trait Implementations§
source§impl Clone for ReflectionType
impl Clone for ReflectionType
source§impl From<Class> for ReflectionType
impl From<Class> for ReflectionType
source§impl InteropClass for ReflectionType
impl InteropClass for ReflectionType
fn get_mono_class() -> Class
source§impl ObjectTrait for ReflectionType
impl ObjectTrait for ReflectionType
source§unsafe fn from_ptr_unchecked(type_ptr: *mut MonoObject) -> Self
unsafe fn from_ptr_unchecked(type_ptr: *mut MonoObject) -> Self
fn cast<Target: ObjectTrait>(&self) -> Option<Target>
source§fn hash(&self) -> i32
fn hash(&self) -> i32
get hash of this object: This hash is not based on values of objects fields, and differs from result of calling object.GetHash() Read more
source§fn get_size(&self) -> u32
fn get_size(&self) -> u32
get size of managed object referenced by self in bytes. Does include builtin hidden data. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ReflectionType
impl Send for ReflectionType
impl Sync for ReflectionType
impl Unpin for ReflectionType
impl UnwindSafe for ReflectionType
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> InteropRecive for Twhere
T: ObjectTrait,
impl<T> InteropRecive for Twhere T: ObjectTrait,
§type SourceType = *mut _MonoObject
type SourceType = *mut _MonoObject
Souce type used by
MonoRuntime
when calling functions exposed by add_internal_call
, or getting a value back from a method, that can be converted to a rust type.source§fn get_rust_rep(src: <T as InteropRecive>::SourceType) -> T
fn get_rust_rep(src: <T as InteropRecive>::SourceType) -> T
Function converting
Self::SourceType
to type implementing InteropRecive
trait.source§impl<T> InteropSend for Twhere
T: ObjectTrait,
impl<T> InteropSend for Twhere T: ObjectTrait,
§type TargetType = *mut _MonoObject
type TargetType = *mut _MonoObject
Type used by
MonoRuntime
, that type implementing InteropSend
trait should be converted to when returning it to MonoRuntime
.source§fn get_mono_rep(src: T) -> <T as InteropSend>::TargetType
fn get_mono_rep(src: T) -> <T as InteropSend>::TargetType
Function converting type implementing
InteropRecive
trait to type that should be returned to MonoRuntime
.