Struct valkyrie_ast::PatternTypeNode
source · pub struct PatternTypeNode {
pub typing: ExpressionKind,
pub guard: Option<ExpressionKind>,
pub span: Range<u32>,
}
Expand description
type Integer | Decimal:
type Integer | Decimal:
case x if (x is (Integer | Decimal)):
if x is Integer {
}
else if x is Decimal {
}
Fields§
§typing: ExpressionKind
The type of the pattern
guard: Option<ExpressionKind>
when a > 0 && a < 10
span: Range<u32>
The range of the node
Trait Implementations§
source§impl Clone for PatternTypeNode
impl Clone for PatternTypeNode
source§fn clone(&self) -> PatternTypeNode
fn clone(&self) -> PatternTypeNode
Returns a copy 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 PatternTypeNode
impl Debug for PatternTypeNode
source§impl From<PatternTypeNode> for PatternCondition
impl From<PatternTypeNode> for PatternCondition
source§fn from(o: PatternTypeNode) -> Self
fn from(o: PatternTypeNode) -> Self
Converts to this type from the input type.
source§impl Hash for PatternTypeNode
impl Hash for PatternTypeNode
source§impl PartialEq for PatternTypeNode
impl PartialEq for PatternTypeNode
source§fn eq(&self, other: &PatternTypeNode) -> bool
fn eq(&self, other: &PatternTypeNode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for PatternTypeNode
impl StructuralPartialEq for PatternTypeNode
Auto Trait Implementations§
impl RefUnwindSafe for PatternTypeNode
impl Send for PatternTypeNode
impl Sync for PatternTypeNode
impl Unpin for PatternTypeNode
impl UnwindSafe for PatternTypeNode
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