pub struct FfiTypeMap { /* private fields */ }Expand description
Bidirectional mapping between LCNF types and C types.
Implementations§
Source§impl FfiTypeMap
impl FfiTypeMap
Sourcepub fn register(&mut self, name: &str, native: FfiNativeType, lcnf: LcnfType)
pub fn register(&mut self, name: &str, native: FfiNativeType, lcnf: LcnfType)
Register a bidirectional type mapping.
Sourcepub fn register_marshal(&mut self, name: &str, info: FfiMarshalInfo)
pub fn register_marshal(&mut self, name: &str, info: FfiMarshalInfo)
Register a custom marshalling rule.
Sourcepub fn to_native(&self, name: &str) -> Option<&FfiNativeType>
pub fn to_native(&self, name: &str) -> Option<&FfiNativeType>
Look up the native type for an LCNF type name.
Sourcepub fn to_lcnf(&self, native_name: &str) -> Option<&LcnfType>
pub fn to_lcnf(&self, native_name: &str) -> Option<&LcnfType>
Look up the LCNF type for a native type.
Sourcepub fn get_marshal(&self, name: &str) -> Option<&FfiMarshalInfo>
pub fn get_marshal(&self, name: &str) -> Option<&FfiMarshalInfo>
Get custom marshalling for a type, if registered.
Trait Implementations§
Source§impl Clone for FfiTypeMap
impl Clone for FfiTypeMap
Source§fn clone(&self) -> FfiTypeMap
fn clone(&self) -> FfiTypeMap
Returns a duplicate 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 FfiTypeMap
impl Debug for FfiTypeMap
Source§impl Default for FfiTypeMap
impl Default for FfiTypeMap
Source§fn default() -> FfiTypeMap
fn default() -> FfiTypeMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FfiTypeMap
impl RefUnwindSafe for FfiTypeMap
impl Send for FfiTypeMap
impl Sync for FfiTypeMap
impl Unpin for FfiTypeMap
impl UnsafeUnpin for FfiTypeMap
impl UnwindSafe for FfiTypeMap
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