pub enum CaseSelector {
Default,
Expression(ExpressionNode),
}
Variants§
Default
Expression(ExpressionNode)
Implementations§
Source§impl CaseSelector
impl CaseSelector
Sourcepub const fn is_default(&self) -> bool
pub const fn is_default(&self) -> bool
Returns true
if this value is of type Default
. Returns false
otherwise
Sourcepub const fn is_expression(&self) -> bool
pub const fn is_expression(&self) -> bool
Returns true
if this value is of type Expression
. Returns false
otherwise
Source§impl CaseSelector
impl CaseSelector
Sourcepub fn unwrap_default(self)
pub fn unwrap_default(self)
Unwraps this value to the CaseSelector::Default
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_expression(self) -> ExpressionNode
pub fn unwrap_expression(self) -> ExpressionNode
Unwraps this value to the CaseSelector::Expression
variant.
Panics if this value is of any other type.
Trait Implementations§
Source§impl Clone for CaseSelector
impl Clone for CaseSelector
Source§fn clone(&self) -> CaseSelector
fn clone(&self) -> CaseSelector
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 CaseSelector
impl Debug for CaseSelector
Source§impl Display for CaseSelector
impl Display for CaseSelector
Source§impl From<Spanned<Expression>> for CaseSelector
impl From<Spanned<Expression>> for CaseSelector
Source§fn from(value: ExpressionNode) -> Self
fn from(value: ExpressionNode) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CaseSelector
impl PartialEq for CaseSelector
impl StructuralPartialEq for CaseSelector
Auto Trait Implementations§
impl Freeze for CaseSelector
impl RefUnwindSafe for CaseSelector
impl Send for CaseSelector
impl Sync for CaseSelector
impl Unpin for CaseSelector
impl UnwindSafe for CaseSelector
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<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