pub struct Pattern<F, X> { /* private fields */ }Implementations§
Source§impl<F, X> Pattern<F, X>
impl<F, X> Pattern<F, X>
pub fn kind(&self) -> &PatternKind<F, X>
pub fn into_kind(self) -> PatternKind<F, X>
pub fn cons(f: F, subs: Vec<Self>) -> Self
pub fn from_slice(f: F, subs: &[Self]) -> Self
pub fn var(x: X) -> Self
pub fn symbol(&self) -> Option<&F>
pub fn sub_patterns(&self) -> Option<&Vec<Self>>
pub fn get(&self, i: usize) -> Option<&Self>
pub fn as_cons(&self) -> Option<(&F, &Vec<Self>)>
pub fn as_term(&self) -> Option<Term<F>>where
F: Clone,
pub fn variables(&self) -> UniqueVariables<'_, X> ⓘwhere
X: PartialEq,
pub fn map_variables<Y, M>(&self, g: &M) -> Pattern<F, Y>
pub fn try_map_variables<Y, M>(&self, g: &M) -> Option<Pattern<F, Y>>
Trait Implementations§
Source§impl<F, X> From<PatternKind<F, X>> for Pattern<F, X>
impl<F, X> From<PatternKind<F, X>> for Pattern<F, X>
Source§fn from(kind: PatternKind<F, X>) -> Pattern<F, X>
fn from(kind: PatternKind<F, X>) -> Pattern<F, X>
Converts to this type from the input type.
Source§impl<F, X> PatternLike<F, X> for Pattern<F, X>
impl<F, X> PatternLike<F, X> for Pattern<F, X>
fn kind(&self) -> PatternLikeKind<'_, F, X, Self>
impl<F: PartialEq + Eq, X: PartialEq + Eq> Eq for Pattern<F, X>
Auto Trait Implementations§
impl<F, X> !Freeze for Pattern<F, X>
impl<F, X> RefUnwindSafe for Pattern<F, X>where
F: RefUnwindSafe,
X: RefUnwindSafe,
impl<F, X> Send for Pattern<F, X>
impl<F, X> Sync for Pattern<F, X>
impl<F, X> Unpin for Pattern<F, X>
impl<F, X> UnwindSafe for Pattern<F, X>
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