pub struct RecordField<I: Layout> {
pub layout: Option<I::FieldLayout>,
pub annotations: Vec<Annotation>,
pub named: bool,
pub bit_width: Option<u64>,
pub ty: Type<I>,
}
Expand description
A field of a record.
Fields§
§layout: Option<I::FieldLayout>
The layout of the field.
This is None
for unnamed fields.
annotations: Vec<Annotation>
The annotations on this field.
named: bool
Whether the field is named.
An unnamed field in C is always a bit-field and is declared like T : N
where
T
is the type of the field and N
is the width of the bit-field.
bit_width: Option<u64>
If this is a bit-field, the width of the field.
The field is recognized as a bit-field if and only if this is Some
.
ty: Type<I>
The type of the field.
Implementations§
Source§impl<I: Layout> RecordField<I>
impl<I: Layout> RecordField<I>
Sourcepub fn into<J: Layout>(self) -> RecordField<J>where
I::TypeLayout: Into<J::TypeLayout>,
I::FieldLayout: Into<J::FieldLayout>,
I::OpaqueLayout: Into<J::OpaqueLayout>,
pub fn into<J: Layout>(self) -> RecordField<J>where
I::TypeLayout: Into<J::TypeLayout>,
I::FieldLayout: Into<J::FieldLayout>,
I::OpaqueLayout: Into<J::OpaqueLayout>,
Returns the identical record field with the Layout
converted.
Trait Implementations§
Source§impl<I: Clone + Layout> Clone for RecordField<I>where
I::FieldLayout: Clone,
impl<I: Clone + Layout> Clone for RecordField<I>where
I::FieldLayout: Clone,
Source§fn clone(&self) -> RecordField<I>
fn clone(&self) -> RecordField<I>
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<I: Debug + Layout> Debug for RecordField<I>where
I::FieldLayout: Debug,
impl<I: Debug + Layout> Debug for RecordField<I>where
I::FieldLayout: Debug,
Source§impl<I: PartialEq + Layout> PartialEq for RecordField<I>where
I::FieldLayout: PartialEq,
impl<I: PartialEq + Layout> PartialEq for RecordField<I>where
I::FieldLayout: PartialEq,
impl<I: Eq + Layout> Eq for RecordField<I>where
I::FieldLayout: Eq,
impl<I: Layout> StructuralPartialEq for RecordField<I>
Auto Trait Implementations§
impl<I> Freeze for RecordField<I>where
<I as Layout>::FieldLayout: Freeze,
<I as Layout>::TypeLayout: Freeze,
<I as Layout>::OpaqueLayout: Freeze,
impl<I> RefUnwindSafe for RecordField<I>where
<I as Layout>::FieldLayout: RefUnwindSafe,
<I as Layout>::TypeLayout: RefUnwindSafe,
<I as Layout>::OpaqueLayout: RefUnwindSafe,
impl<I> Send for RecordField<I>where
<I as Layout>::FieldLayout: Send,
<I as Layout>::TypeLayout: Send,
<I as Layout>::OpaqueLayout: Send,
impl<I> Sync for RecordField<I>where
<I as Layout>::FieldLayout: Sync,
<I as Layout>::TypeLayout: Sync,
<I as Layout>::OpaqueLayout: Sync,
impl<I> Unpin for RecordField<I>where
<I as Layout>::FieldLayout: Unpin,
<I as Layout>::TypeLayout: Unpin,
<I as Layout>::OpaqueLayout: Unpin,
impl<I> UnwindSafe for RecordField<I>where
<I as Layout>::FieldLayout: UnwindSafe,
<I as Layout>::TypeLayout: UnwindSafe,
<I as Layout>::OpaqueLayout: UnwindSafe,
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