Enum interoptopus::patterns::TypePattern
source · pub enum TypePattern {
AsciiPointer,
APIVersion,
FFIErrorEnum(FFIErrorEnum),
Slice(CompositeType),
SliceMut(CompositeType),
Option(CompositeType),
Bool,
CChar,
NamedCallback(NamedCallback),
}
Expand description
A pattern on a type level.
Variants§
AsciiPointer
APIVersion
FFIErrorEnum(FFIErrorEnum)
Slice(CompositeType)
SliceMut(CompositeType)
Option(CompositeType)
Bool
CChar
NamedCallback(NamedCallback)
Implementations§
source§impl 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§
source§impl Clone for TypePattern
impl Clone for TypePattern
source§fn clone(&self) -> TypePattern
fn clone(&self) -> TypePattern
Returns a copy 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 TypePattern
impl Debug for TypePattern
source§impl Hash for TypePattern
impl Hash for TypePattern
source§impl Ord for TypePattern
impl Ord for TypePattern
source§fn cmp(&self, other: &TypePattern) -> Ordering
fn cmp(&self, other: &TypePattern) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for TypePattern
impl PartialEq for TypePattern
source§fn 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 ==
.source§impl PartialOrd for TypePattern
impl PartialOrd for TypePattern
source§fn partial_cmp(&self, other: &TypePattern) -> Option<Ordering>
fn partial_cmp(&self, other: &TypePattern) -> Option<Ordering>
1.0.0 · source§fn 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 moreimpl Eq 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§
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