pub struct StructBuilder { /* private fields */ }Expand description
Builder for StructType
Implementations§
Source§impl StructBuilder
impl StructBuilder
Sourcepub const fn new() -> StructBuilder
pub const fn new() -> StructBuilder
Creates a new StructBuilder
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 repr(self, repr: Repr) -> StructBuilder
pub const fn repr(self, repr: Repr) -> StructBuilder
Sets the repr for the StructType
Sourcepub const fn kind(self, kind: StructKind) -> StructBuilder
pub const fn kind(self, kind: StructKind) -> StructBuilder
Sets the kind for the StructType
Sourcepub const fn fields(self, fields: &'static [Field]) -> StructBuilder
pub const fn fields(self, fields: &'static [Field]) -> StructBuilder
Sets the fields for the StructType
Sourcepub const fn build(self) -> StructType
pub const fn build(self) -> StructType
Builds the StructType
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