Enum interoptopus::patterns::TypePattern
source · [−]pub enum TypePattern {
AsciiPointer,
APIVersion,
FFIErrorEnum(FFIErrorEnum),
Slice(CompositeType),
SliceMut(CompositeType),
Option(CompositeType),
Bool,
NamedCallback(NamedCallback),
}
Expand description
A pattern on a type level.
Variants
AsciiPointer
APIVersion
FFIErrorEnum(FFIErrorEnum)
Slice(CompositeType)
SliceMut(CompositeType)
Option(CompositeType)
Bool
NamedCallback(NamedCallback)
Implementations
sourceimpl TypePattern
impl TypePattern
sourcepub fn fallback_type(&self) -> CType
pub fn fallback_type(&self) -> CType
For languages like C that don’t care about these patterns, give the C-equivalent fallback type.
This function will never return a CType::Pattern
variant.
Trait Implementations
sourceimpl Clone for TypePattern
impl Clone for TypePattern
sourcefn clone(&self) -> TypePattern
fn clone(&self) -> TypePattern
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TypePattern
impl Debug for TypePattern
sourceimpl Hash for TypePattern
impl Hash for TypePattern
sourceimpl Ord for TypePattern
impl Ord for TypePattern
sourceimpl PartialEq<TypePattern> for TypePattern
impl PartialEq<TypePattern> for TypePattern
sourcefn eq(&self, other: &TypePattern) -> bool
fn eq(&self, other: &TypePattern) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TypePattern) -> bool
fn ne(&self, other: &TypePattern) -> bool
This method tests for !=
.
sourceimpl PartialOrd<TypePattern> for TypePattern
impl PartialOrd<TypePattern> for TypePattern
sourcefn partial_cmp(&self, other: &TypePattern) -> Option<Ordering>
fn partial_cmp(&self, other: &TypePattern) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for TypePattern
impl StructuralEq for TypePattern
impl StructuralPartialEq for TypePattern
Auto Trait Implementations
impl RefUnwindSafe for TypePattern
impl Send for TypePattern
impl Sync for TypePattern
impl Unpin for TypePattern
impl UnwindSafe for TypePattern
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more