pub struct Enumerant {
pub req_params: ArrayVec<PackedOperandNameAndKind, 3>,
pub rest_params: Option<OperandKind>,
}Fields§
§req_params: ArrayVec<PackedOperandNameAndKind, 3>§rest_params: Option<OperandKind>Implementations§
Source§impl Enumerant
impl Enumerant
Sourcepub fn all_params(
&self,
) -> impl Iterator<Item = (OperandMode, OperandKind)> + '_
pub fn all_params( &self, ) -> impl Iterator<Item = (OperandMode, OperandKind)> + '_
Return a (potentially infinite) iterator of OperandKinds, along with
the OperandMode indicating whether an operand is expected (Required),
or that an operand’s absence signals the end of operands (Optional),
which is also the exit signal for the “rest operands” infinite iterators.
Sourcepub fn all_params_with_names(
&self,
) -> impl Iterator<Item = (OperandMode, PackedOperandNameAndKind)> + '_
pub fn all_params_with_names( &self, ) -> impl Iterator<Item = (OperandMode, PackedOperandNameAndKind)> + '_
Like all_params, but providing access to the operand names as well.
Trait Implementations§
impl Eq for Enumerant
impl StructuralPartialEq for Enumerant
Auto Trait Implementations§
impl Freeze for Enumerant
impl RefUnwindSafe for Enumerant
impl Send for Enumerant
impl Sync for Enumerant
impl Unpin for Enumerant
impl UnwindSafe for Enumerant
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<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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more