pub struct StructBuilder { /* private fields */ }Expand description
Builder for struct types.
Implementations§
Source§impl StructBuilder
impl StructBuilder
Sourcepub fn extensibility(self, ext: Extensibility) -> Self
pub fn extensibility(self, ext: Extensibility) -> Self
Sets the extensibility (default: Appendable).
Sourcepub fn autoid_hash(self) -> Self
pub fn autoid_hash(self) -> Self
Aktiviert @autoid(HASH).
Sourcepub fn base(self, base: TypeIdentifier) -> Self
pub fn base(self, base: TypeIdentifier) -> Self
Sets a base type for inheritance.
Sourcepub fn member<F>(
self,
name: impl Into<String>,
ty: TypeIdentifier,
f: F,
) -> Self
pub fn member<F>( self, name: impl Into<String>, ty: TypeIdentifier, f: F, ) -> Self
Adds a member.
The callback receives a StructMemberBuilder to set flags
and annotations.
Sourcepub fn build_minimal(&self) -> MinimalStructType
pub fn build_minimal(&self) -> MinimalStructType
Builds a MinimalStructType.
Sourcepub fn build_complete(&self) -> CompleteStructType
pub fn build_complete(&self) -> CompleteStructType
Builds a CompleteStructType.
Auto Trait Implementations§
impl Freeze for StructBuilder
impl RefUnwindSafe for StructBuilder
impl Send for StructBuilder
impl Sync for StructBuilder
impl Unpin for StructBuilder
impl UnsafeUnpin 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