#[non_exhaustive]pub struct LayoutDef {
pub name: String,
pub container: Container,
pub fields: Vec<Field>,
pub view: bool,
pub doc: Option<String>,
pub derives: Vec<Derive>,
}Expand description
A fixed-size layout whose fields cover every bit of its container.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe type name.
container: ContainerThe container.
fields: Vec<Field>The fields, in wire order.
view: boolWhether to generate a <Name>View that reads fields in place: #[layout(.., view)].
doc: Option<String>Documentation.
derives: Vec<Derive>Derives for this layout, written after the module’s.
Implementations§
Trait Implementations§
impl Eq for LayoutDef
impl StructuralPartialEq for LayoutDef
Auto Trait Implementations§
impl Freeze for LayoutDef
impl RefUnwindSafe for LayoutDef
impl Send for LayoutDef
impl Sync for LayoutDef
impl Unpin for LayoutDef
impl UnsafeUnpin for LayoutDef
impl UnwindSafe for LayoutDef
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