Struct const_type_layout::Field
source · pub struct Field<'a> {
pub name: &'a str,
pub offset: MaybeUninhabited<usize>,
pub ty: &'a str,
}
Available on crate feature
derive
only.Expand description
Descriptor of the shallow layout of a field.
Fields§
§name: &'a str
The field’s name.
offset: MaybeUninhabited<usize>
The field’s byte offset, iff the field is inhabited.
ty: &'a str
The fully-qualified name of the field’s type. This is used as a key
inside TypeLayoutGraph::tys
to find the field’s type’s layout by
its TypeLayoutInfo::name
.
Trait Implementations§
source§impl<'de: 'a, 'a> Deserialize<'de> for Field<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Field<'a>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> Ord for Field<'a>
impl<'a> Ord for Field<'a>
source§impl<'a> PartialEq for Field<'a>
impl<'a> PartialEq for Field<'a>
source§impl<'a> PartialOrd for Field<'a>
impl<'a> PartialOrd for Field<'a>
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<'a> Copy for Field<'a>
impl<'a> Eq for Field<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Field<'a>
impl<'a> Send for Field<'a>
impl<'a> Sync for Field<'a>
impl<'a> Unpin for Field<'a>
impl<'a> UnwindSafe for Field<'a>
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> ExtractDiscriminant for T
impl<T> ExtractDiscriminant for T
§type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
The type of the discriminant, which must satisfy the trait bounds
required by
core::mem::Discriminant
. Read more