pub struct TernaryPattern {
pub elements: Vec<PatternElem>,
}Expand description
A compiled pattern: a sequence of PatternElems.
Fields§
§elements: Vec<PatternElem>Implementations§
Source§impl TernaryPattern
impl TernaryPattern
Sourcepub fn new(elements: Vec<PatternElem>) -> Self
pub fn new(elements: Vec<PatternElem>) -> Self
Create a pattern from a slice of PatternElems.
Sourcepub fn elem_matches(elem: PatternElem, val: Ternary) -> bool
pub fn elem_matches(elem: PatternElem, val: Ternary) -> bool
Check if an element matches a ternary value.
Trait Implementations§
Source§impl Clone for TernaryPattern
impl Clone for TernaryPattern
Source§fn clone(&self) -> TernaryPattern
fn clone(&self) -> TernaryPattern
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TernaryPattern
impl RefUnwindSafe for TernaryPattern
impl Send for TernaryPattern
impl Sync for TernaryPattern
impl Unpin for TernaryPattern
impl UnsafeUnpin for TernaryPattern
impl UnwindSafe for TernaryPattern
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