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