pub enum CalcProductOrOperator {
Product(CalcProduct),
Operator(CalcOperator),
}Variants§
Product(CalcProduct)
Operator(CalcOperator)
Implementations§
Source§impl CalcProductOrOperator
impl CalcProductOrOperator
Sourcepub const fn is_product(&self) -> bool
pub const fn is_product(&self) -> bool
Returns true if self is of variant Product.
Sourcepub fn as_product(&self) -> Option<&CalcProduct>
pub fn as_product(&self) -> Option<&CalcProduct>
Returns Some if self is a reference of variant Product, and None otherwise.
Sourcepub fn as_mut_product(&mut self) -> Option<&mut CalcProduct>
pub fn as_mut_product(&mut self) -> Option<&mut CalcProduct>
Returns Some if self is a mutable reference of variant Product, and None otherwise.
Sourcepub fn expect_product(self) -> CalcProductwhere
Self: Debug,
pub fn expect_product(self) -> CalcProductwhere
Self: Debug,
Sourcepub fn product(self) -> Option<CalcProduct>
pub fn product(self) -> Option<CalcProduct>
Returns Some if self is of variant Product, and None otherwise.
Sourcepub const fn is_operator(&self) -> bool
pub const fn is_operator(&self) -> bool
Returns true if self is of variant Operator.
Sourcepub fn as_operator(&self) -> Option<&CalcOperator>
pub fn as_operator(&self) -> Option<&CalcOperator>
Returns Some if self is a reference of variant Operator, and None otherwise.
Sourcepub fn as_mut_operator(&mut self) -> Option<&mut CalcOperator>
pub fn as_mut_operator(&mut self) -> Option<&mut CalcOperator>
Returns Some if self is a mutable reference of variant Operator, and None otherwise.
Sourcepub fn expect_operator(self) -> CalcOperatorwhere
Self: Debug,
pub fn expect_operator(self) -> CalcOperatorwhere
Self: Debug,
Sourcepub fn operator(self) -> Option<CalcOperator>
pub fn operator(self) -> Option<CalcOperator>
Returns Some if self is of variant Operator, and None otherwise.
Trait Implementations§
Source§impl Clone for CalcProductOrOperator
impl Clone for CalcProductOrOperator
Source§fn clone(&self) -> CalcProductOrOperator
fn clone(&self) -> CalcProductOrOperator
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 Debug for CalcProductOrOperator
impl Debug for CalcProductOrOperator
Source§impl EqIgnoreSpan for CalcProductOrOperator
impl EqIgnoreSpan for CalcProductOrOperator
fn eq_ignore_span(&self, other: &Self) -> bool
Source§impl From<CalcOperator> for CalcProductOrOperator
impl From<CalcOperator> for CalcProductOrOperator
Source§fn from(v: CalcOperator) -> Self
fn from(v: CalcOperator) -> Self
Converts to this type from the input type.
Source§impl From<CalcProduct> for CalcProductOrOperator
impl From<CalcProduct> for CalcProductOrOperator
Source§fn from(v: CalcProduct) -> Self
fn from(v: CalcProduct) -> Self
Converts to this type from the input type.
Source§impl Hash for CalcProductOrOperator
impl Hash for CalcProductOrOperator
Source§impl PartialEq for CalcProductOrOperator
impl PartialEq for CalcProductOrOperator
Source§impl Spanned for CalcProductOrOperator
impl Spanned for CalcProductOrOperator
impl Eq for CalcProductOrOperator
impl StructuralPartialEq for CalcProductOrOperator
Auto Trait Implementations§
impl Freeze for CalcProductOrOperator
impl RefUnwindSafe for CalcProductOrOperator
impl Send for CalcProductOrOperator
impl Sync for CalcProductOrOperator
impl Unpin for CalcProductOrOperator
impl UnwindSafe for CalcProductOrOperator
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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