pub enum Layout<L = ()>where
L: Location,{
Primitive(PrimitiveLayout<L>),
Std(StdLayout<L>),
Struct(StructLayout<L>),
Enum(EnumLayout<L>),
CEnum(CEnumLayout),
Alias {
name: String,
},
}
Variants§
Primitive(PrimitiveLayout<L>)
Language-specific primitive types from core::primitive
(e.g. i32
, f64
, etc.)
There are all simple types that can be backed by a single slice of memory and easily transumted to a Rust type
Std(StdLayout<L>)
Common definitions from the Rust standard library
Struct(StructLayout<L>)
Structs and tuples
Enum(EnumLayout<L>)
Enums
CEnum(CEnumLayout)
C-style enumerations (simple named integer constants)
Alias
Type currently known only by its name
Implementations§
Trait Implementations§
Source§impl<L: Location> From<EnumLayout<L>> for Layout<L>
impl<L: Location> From<EnumLayout<L>> for Layout<L>
Source§fn from(enum_def: EnumLayout<L>) -> Self
fn from(enum_def: EnumLayout<L>) -> Self
Converts to this type from the input type.
Source§impl<L: Location> From<FloatLayout> for Layout<L>
impl<L: Location> From<FloatLayout> for Layout<L>
Source§fn from(float: FloatLayout) -> Self
fn from(float: FloatLayout) -> Self
Converts to this type from the input type.
Source§impl<L: Location> From<PrimitiveLayout<L>> for Layout<L>
impl<L: Location> From<PrimitiveLayout<L>> for Layout<L>
Source§fn from(primitive: PrimitiveLayout<L>) -> Self
fn from(primitive: PrimitiveLayout<L>) -> Self
Converts to this type from the input type.
Source§impl<L: Location> From<ReferenceLayout<L>> for Layout<L>
impl<L: Location> From<ReferenceLayout<L>> for Layout<L>
Source§fn from(reference: ReferenceLayout<L>) -> Self
fn from(reference: ReferenceLayout<L>) -> Self
Converts to this type from the input type.
Source§impl<L: Location> From<SmartPtrLayout<L>> for Layout<L>
impl<L: Location> From<SmartPtrLayout<L>> for Layout<L>
Source§fn from(smart_ptr: SmartPtrLayout<L>) -> Self
fn from(smart_ptr: SmartPtrLayout<L>) -> Self
Converts to this type from the input type.
Source§impl<L: Location> From<StringLayout<L>> for Layout<L>
impl<L: Location> From<StringLayout<L>> for Layout<L>
Source§fn from(string: StringLayout<L>) -> Self
fn from(string: StringLayout<L>) -> Self
Converts to this type from the input type.
Source§impl<L: Location> From<StructLayout<L>> for Layout<L>
impl<L: Location> From<StructLayout<L>> for Layout<L>
Source§fn from(struct_def: StructLayout<L>) -> Self
fn from(struct_def: StructLayout<L>) -> Self
Converts to this type from the input type.
Source§impl<L: Location> From<UnsignedIntLayout> for Layout<L>
impl<L: Location> From<UnsignedIntLayout> for Layout<L>
Source§fn from(uint: UnsignedIntLayout) -> Self
fn from(uint: UnsignedIntLayout) -> Self
Converts to this type from the input type.
impl<L> Eq for Layout<L>
impl<L> StructuralPartialEq for Layout<L>where
L: Location,
Auto Trait Implementations§
impl<L> Freeze for Layout<L>where
L: Freeze,
impl<L> RefUnwindSafe for Layout<L>where
L: RefUnwindSafe,
impl<L> Send for Layout<L>
impl<L> Sync for Layout<L>
impl<L> Unpin for Layout<L>where
L: Unpin,
impl<L> UnwindSafe for Layout<L>where
L: UnwindSafe + RefUnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more