Struct camo_typescript::UnionType
source · pub struct UnionType {
pub variants: Vec<Variant>,
}
Expand description
A type with multiple cases.
Example:
type Primitive =
| number
| boolean
| symbol;
See: https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types
Fields§
§variants: Vec<Variant>
The variants of the union type.
Trait Implementations§
source§impl PartialEq<UnionType> for UnionType
impl PartialEq<UnionType> for UnionType
impl StructuralPartialEq for UnionType
Auto Trait Implementations§
impl RefUnwindSafe for UnionType
impl Send for UnionType
impl Sync for UnionType
impl Unpin for UnionType
impl UnwindSafe for UnionType
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