pub struct UnionBuilder { /* private fields */ }Expand description
Builder for union types.
Implementations§
Source§impl UnionBuilder
impl UnionBuilder
Sourcepub fn extensibility(self, ext: Extensibility) -> Self
pub fn extensibility(self, ext: Extensibility) -> Self
Sets the extensibility (default Appendable).
Sourcepub fn case(
self,
name: impl Into<String>,
ty: TypeIdentifier,
labels: Vec<i32>,
) -> Self
pub fn case( self, name: impl Into<String>, ty: TypeIdentifier, labels: Vec<i32>, ) -> Self
Adds a case member.
Sourcepub fn default_case(self, name: impl Into<String>, ty: TypeIdentifier) -> Self
pub fn default_case(self, name: impl Into<String>, ty: TypeIdentifier) -> Self
Adds the default case.
Sourcepub fn build_minimal(&self) -> MinimalUnionType
pub fn build_minimal(&self) -> MinimalUnionType
Builds a MinimalUnionType.
Sourcepub fn build_complete(&self) -> CompleteUnionType
pub fn build_complete(&self) -> CompleteUnionType
Builds a CompleteUnionType.
Auto Trait Implementations§
impl Freeze for UnionBuilder
impl RefUnwindSafe for UnionBuilder
impl Send for UnionBuilder
impl Sync for UnionBuilder
impl Unpin for UnionBuilder
impl UnsafeUnpin for UnionBuilder
impl UnwindSafe for UnionBuilder
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