[−][src]Trait rebound::reflect::Reflected
A trait representing any reflected Type
. Supports operations common to all Types,
such as retrieving its qualified name or impl information.
Associated Types
type Meta: Copy = ()
[src]
The type of any meta-information required to get back a pointer to this type, if it is unsized
Required methods
pub fn name() -> String
[src]
Get the qualified name of this Type
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
Internal Function used to create a pointer to this type from Metadata and a type-erased pointer.
Safety
This function may perform raw pointer dereferences, or other unsafe operations, at will. The passed meta and ptr must be valid pointers that originated as the type to assemble.
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
Internal Function used to get the metadata and a type-erased pointer for an instance of this Type.
pub unsafe fn init()
[src]
Internal Function used to initialize this Type, making it accessible by name and ready for use in reflection.
Safety
Should only ever be called once during a single execution of the program, and should not be called by consumers of this library.
Provided methods
pub fn assoc_fns() -> Vec<AssocFn>
[src]
Get all the associated functions for this Type that rebound is aware of
pub fn assoc_consts() -> Vec<AssocConst>
[src]
Get all the associated constants for this Type that rebound is aware of
Implementations on Foreign Types
impl Reflected for u8
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for u16
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for u32
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for u64
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for u128
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for usize
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for i8
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for i16
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for i32
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for i64
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for i128
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for isize
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for f32
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for f64
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for char
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for bool
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for str
[src]
type Meta = usize
pub fn name() -> String
[src]
pub unsafe fn assemble(meta: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl Reflected for ()
[src]
pub fn name() -> String
[src]
pub unsafe fn assemble(_: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl<T0> Reflected for (T0,) where
T0: Reflected,
[src]
T0: Reflected,
pub fn name() -> String
[src]
pub unsafe fn assemble(_: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl<T0, T1> Reflected for (T0, T1) where
T0: Reflected,
T1: Reflected,
[src]
T0: Reflected,
T1: Reflected,
pub fn name() -> String
[src]
pub unsafe fn assemble(_: *mut Self::Meta, ptr: *mut ()) -> *mut Self
[src]
pub fn disassemble(&self) -> (Self::Meta, *mut ())
[src]
pub unsafe fn init()
[src]
impl<T0, T1, T2> Reflected for (T0, T1, T2) where
T0: Reflected,
T1: Reflected,
T2: Reflected,
[src]
T0: Reflected,
T1: Reflected,
T2: Reflected,