pub struct Enumeration<T> { /* private fields */ }Implementations§
Source§impl<T> Enumeration<T>
impl<T> Enumeration<T>
pub fn with_extension_after( self, extension_after: Option<usize>, ) -> Enumeration<T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn variants(&self) -> impl Iterator<Item = &T>
pub fn extension_after_index(&self) -> Option<usize>
pub fn extension_after_variant(&self) -> Option<&T>
pub fn is_extensible(&self) -> bool
Source§impl Enumeration<String>
impl Enumeration<String>
pub fn from_names( names: impl Iterator<Item = impl ToString>, ) -> Enumeration<String>
Trait Implementations§
Source§impl<T> Clone for Enumeration<T>where
T: Clone,
impl<T> Clone for Enumeration<T>where
T: Clone,
Source§fn clone(&self) -> Enumeration<T>
fn clone(&self) -> Enumeration<T>
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<T> Debug for Enumeration<T>where
T: Debug,
impl<T> Debug for Enumeration<T>where
T: Debug,
Source§impl<T> From<Vec<T>> for Enumeration<T>
impl<T> From<Vec<T>> for Enumeration<T>
Source§fn from(variants: Vec<T>) -> Enumeration<T>
fn from(variants: Vec<T>) -> Enumeration<T>
Converts to this type from the input type.
Source§impl<T> PartialEq for Enumeration<T>where
T: PartialEq,
impl<T> PartialEq for Enumeration<T>where
T: PartialEq,
Source§impl<T> PartialOrd for Enumeration<T>where
T: PartialOrd,
impl<T> PartialOrd for Enumeration<T>where
T: PartialOrd,
Source§impl<T> TagProperty for Enumeration<T>
impl<T> TagProperty for Enumeration<T>
impl<T> Eq for Enumeration<T>where
T: Eq,
impl<T> StructuralPartialEq for Enumeration<T>
Auto Trait Implementations§
impl<T> Freeze for Enumeration<T>
impl<T> RefUnwindSafe for Enumeration<T>where
T: RefUnwindSafe,
impl<T> Send for Enumeration<T>where
T: Send,
impl<T> Sync for Enumeration<T>where
T: Sync,
impl<T> Unpin for Enumeration<T>where
T: Unpin,
impl<T> UnwindSafe for Enumeration<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.