pub enum VariantTypeId<'a> {
Empty,
Scalar(VariantScalarTypeId),
Array(VariantScalarTypeId, Option<&'a [u32]>),
}Expand description
The variant type id is the type of the variant but without its payload.
Variants§
Empty
The variant is empty.
Scalar(VariantScalarTypeId)
The variant is a scalar with this inner type.
Array(VariantScalarTypeId, Option<&'a [u32]>)
The variant is an array with this inner type and optionally these ArrayDimensions.
Implementations§
Source§impl VariantTypeId<'_>
impl VariantTypeId<'_>
Sourcepub fn encoding_mask(&self) -> u8
pub fn encoding_mask(&self) -> u8
Get the encoding mask.
Sourcepub fn precedence(&self) -> u8
pub fn precedence(&self) -> u8
Get the precedence when converting between different variant types.
Trait Implementations§
Source§impl<'a> Clone for VariantTypeId<'a>
impl<'a> Clone for VariantTypeId<'a>
Source§fn clone(&self) -> VariantTypeId<'a>
fn clone(&self) -> VariantTypeId<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for VariantTypeId<'a>
impl<'a> Debug for VariantTypeId<'a>
Source§impl<'a> From<(VariantScalarTypeId, &'a [u32])> for VariantTypeId<'a>
impl<'a> From<(VariantScalarTypeId, &'a [u32])> for VariantTypeId<'a>
Source§fn from(value: (VariantScalarTypeId, &'a [u32])) -> Self
fn from(value: (VariantScalarTypeId, &'a [u32])) -> Self
Converts to this type from the input type.
Source§impl From<VariantScalarTypeId> for VariantTypeId<'_>
impl From<VariantScalarTypeId> for VariantTypeId<'_>
Source§fn from(value: VariantScalarTypeId) -> Self
fn from(value: VariantScalarTypeId) -> Self
Converts to this type from the input type.
Source§impl<'a> PartialEq for VariantTypeId<'a>
impl<'a> PartialEq for VariantTypeId<'a>
Source§impl TryFrom<&NodeId> for VariantTypeId<'_>
impl TryFrom<&NodeId> for VariantTypeId<'_>
Source§type Error = NodeIdError
type Error = NodeIdError
The type returned in the event of a conversion error.
impl<'a> Copy for VariantTypeId<'a>
impl<'a> StructuralPartialEq for VariantTypeId<'a>
Auto Trait Implementations§
impl<'a> Freeze for VariantTypeId<'a>
impl<'a> RefUnwindSafe for VariantTypeId<'a>
impl<'a> Send for VariantTypeId<'a>
impl<'a> Sync for VariantTypeId<'a>
impl<'a> Unpin for VariantTypeId<'a>
impl<'a> UnsafeUnpin for VariantTypeId<'a>
impl<'a> UnwindSafe for VariantTypeId<'a>
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