pub struct StructBuilder { /* private fields */ }Expand description
Builder for StructDef
Implementations§
Source§impl StructBuilder
impl StructBuilder
Sourcepub const fn new() -> StructBuilder
pub const fn new() -> StructBuilder
Creates a new StructDefBuilder
Sourcepub const fn unit(self) -> StructBuilder
pub const fn unit(self) -> StructBuilder
Sets the kind to Unit and returns self
Sourcepub const fn tuple(self) -> StructBuilder
pub const fn tuple(self) -> StructBuilder
Sets the kind to Tuple and returns self
Sourcepub const fn struct_(self) -> StructBuilder
pub const fn struct_(self) -> StructBuilder
Sets the kind to Struct and returns self
Sourcepub const fn kind(self, kind: StructKind) -> StructBuilder
pub const fn kind(self, kind: StructKind) -> StructBuilder
Sets the kind for the StructDef
Sourcepub const fn fields(self, fields: &'static [Field]) -> StructBuilder
pub const fn fields(self, fields: &'static [Field]) -> StructBuilder
Sets the fields for the StructDef
Auto Trait Implementations§
impl Freeze for StructBuilder
impl RefUnwindSafe for StructBuilder
impl Send for StructBuilder
impl Sync for StructBuilder
impl Unpin for StructBuilder
impl UnwindSafe for StructBuilder
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