pub struct PatternBinding {
pub name: String,
pub position: usize,
pub ty: Option<String>,
}Expand description
A variable binding in a pattern match.
Fields§
§name: StringVariable name
position: usizePosition in the constructor (0-indexed)
ty: Option<String>Type annotation if present
Implementations§
Trait Implementations§
Source§impl Clone for PatternBinding
impl Clone for PatternBinding
Source§fn clone(&self) -> PatternBinding
fn clone(&self) -> PatternBinding
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 moreAuto Trait Implementations§
impl Freeze for PatternBinding
impl RefUnwindSafe for PatternBinding
impl Send for PatternBinding
impl Sync for PatternBinding
impl Unpin for PatternBinding
impl UnsafeUnpin for PatternBinding
impl UnwindSafe for PatternBinding
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