pub struct StructBuilder<'shape> { /* private fields */ }Expand description
Builder for StructType
Implementations§
Source§impl<'shape> StructBuilder<'shape>
impl<'shape> StructBuilder<'shape>
Sourcepub const fn kind(self, kind: StructKind) -> Self
pub const fn kind(self, kind: StructKind) -> Self
Sets the kind for the StructType
Sourcepub const fn fields(self, fields: &'static [Field<'_>]) -> Self
pub const fn fields(self, fields: &'static [Field<'_>]) -> Self
Sets the fields for the StructType
Sourcepub const fn build(self) -> StructType<'shape>
pub const fn build(self) -> StructType<'shape>
Builds the StructType
Auto Trait Implementations§
impl<'shape> Freeze for StructBuilder<'shape>
impl<'shape> RefUnwindSafe for StructBuilder<'shape>
impl<'shape> Send for StructBuilder<'shape>
impl<'shape> Sync for StructBuilder<'shape>
impl<'shape> Unpin for StructBuilder<'shape>
impl<'shape> UnwindSafe for StructBuilder<'shape>
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