Struct repc_impl::layout::RecordField [−][src]
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
pub 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
impl<I: PartialEq + Layout> PartialEq<RecordField<I>> for RecordField<I> where
I::FieldLayout: PartialEq,
impl<I: PartialEq + Layout> PartialEq<RecordField<I>> for RecordField<I> where
I::FieldLayout: PartialEq,
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<I> RefUnwindSafe for RecordField<I> where
<I as Layout>::FieldLayout: RefUnwindSafe,
<I as Layout>::OpaqueLayout: RefUnwindSafe,
<I as Layout>::TypeLayout: RefUnwindSafe,
impl<I> Send for RecordField<I> where
<I as Layout>::FieldLayout: Send,
<I as Layout>::OpaqueLayout: Send,
<I as Layout>::TypeLayout: Send,
impl<I> Sync for RecordField<I> where
<I as Layout>::FieldLayout: Sync,
<I as Layout>::OpaqueLayout: Sync,
<I as Layout>::TypeLayout: Sync,
impl<I> Unpin for RecordField<I> where
<I as Layout>::FieldLayout: Unpin,
<I as Layout>::OpaqueLayout: Unpin,
<I as Layout>::TypeLayout: Unpin,
impl<I> UnwindSafe for RecordField<I> where
<I as Layout>::FieldLayout: UnwindSafe,
<I as Layout>::OpaqueLayout: UnwindSafe,
<I as Layout>::TypeLayout: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more