pub struct EnumerationType<'input> { /* private fields */ }
Expand description
An enumeration type.
Implementations§
Source§impl<'input> EnumerationType<'input>
impl<'input> EnumerationType<'input>
Sourcepub fn is_declaration(&self) -> bool
pub fn is_declaration(&self) -> bool
Return true if this is a declaration.
Sourcepub fn ty<'a>(
&self,
hash: &'a FileHash<'input>,
) -> Option<Cow<'a, Type<'input>>>
pub fn ty<'a>( &self, hash: &'a FileHash<'input>, ) -> Option<Cow<'a, Type<'input>>>
The underlying type of the enumeration.
Sourcepub fn byte_size(&self, hash: &FileHash<'_>) -> Option<u64>
pub fn byte_size(&self, hash: &FileHash<'_>) -> Option<u64>
The size in bytes of an instance of this type.
Sourcepub fn enumerators(&self, hash: &FileHash<'input>) -> Vec<Enumerator<'input>>
pub fn enumerators(&self, hash: &FileHash<'input>) -> Vec<Enumerator<'input>>
The enumerators of this type.
Sourcepub fn cmp_id(a: &EnumerationType<'_>, b: &EnumerationType<'_>) -> Ordering
pub fn cmp_id(a: &EnumerationType<'_>, b: &EnumerationType<'_>) -> Ordering
Compare the identifying information of two types.
Enumerations 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§
Source§impl<'input> Clone for EnumerationType<'input>
impl<'input> Clone for EnumerationType<'input>
Source§fn clone(&self) -> EnumerationType<'input>
fn clone(&self) -> EnumerationType<'input>
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<'input> Debug for EnumerationType<'input>
impl<'input> Debug for EnumerationType<'input>
Source§impl<'input> Default for EnumerationType<'input>
impl<'input> Default for EnumerationType<'input>
Source§fn default() -> EnumerationType<'input>
fn default() -> EnumerationType<'input>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'input> Freeze for EnumerationType<'input>
impl<'input> RefUnwindSafe for EnumerationType<'input>
impl<'input> Send for EnumerationType<'input>
impl<'input> Sync for EnumerationType<'input>
impl<'input> Unpin for EnumerationType<'input>
impl<'input> UnwindSafe for EnumerationType<'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