pub struct UnionType<'input> { /* private fields */ }
Expand description
A union type.
Implementations§
Source§impl<'input> UnionType<'input>
impl<'input> UnionType<'input>
Sourcepub fn is_declaration(&self) -> bool
pub fn is_declaration(&self) -> bool
Return true if this is a declaration.
Sourcepub fn is_anon(&self) -> bool
pub fn is_anon(&self) -> bool
Return true if this is an anonymous type, or defined within an anonymous type.
Sourcepub fn cmp_id(a: &UnionType<'_>, b: &UnionType<'_>) -> Ordering
pub fn cmp_id(a: &UnionType<'_>, b: &UnionType<'_>) -> Ordering
Compare the identifying information of two types.
Unions are considered equal if their names are equal.
This can be used to sort, and to determine if two types refer to the same definition (even if there are differences in the definitions).
Trait Implementations§
Auto Trait Implementations§
impl<'input> Freeze for UnionType<'input>
impl<'input> RefUnwindSafe for UnionType<'input>
impl<'input> Send for UnionType<'input>
impl<'input> Sync for UnionType<'input>
impl<'input> Unpin for UnionType<'input>
impl<'input> UnwindSafe for UnionType<'input>
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