[][src]Struct terms::pattern::Pattern

pub struct Pattern<F, X> { /* fields omitted */ }

Methods

impl<F, X> Pattern<F, X>[src]

pub fn kind(&self) -> &PatternKind<F, X>[src]

pub fn into_kind(self) -> PatternKind<F, X>[src]

pub fn cons(f: F, subs: Vec<Self>) -> Self where
    F: Clone,
    X: Clone
[src]

pub fn from_slice(f: F, subs: &[Self]) -> Self where
    F: Clone,
    X: Clone
[src]

pub fn var(x: X) -> Self[src]

pub fn symbol(&self) -> Option<&F>[src]

pub fn sub_patterns(&self) -> Option<&Vec<Self>>[src]

pub fn get(&self, i: usize) -> Option<&Self>[src]

pub fn as_cons(&self) -> Option<(&F, &Vec<Self>)>[src]

pub fn as_term(&self) -> Option<Term<F>> where
    F: Clone
[src]

Important traits for UniqueVariables<'a, X>
pub fn variables(&self) -> UniqueVariables<X> where
    X: PartialEq
[src]

pub fn map_variables<Y, M>(&self, g: &M) -> Pattern<F, Y> where
    M: Fn(&X) -> Pattern<F, Y>,
    F: Clone
[src]

pub fn try_map_variables<Y, M>(&self, g: &M) -> Option<Pattern<F, Y>> where
    M: Fn(&X) -> Option<Pattern<F, Y>>,
    F: Clone
[src]

pub fn renaming<Z: Clone, W: Clone, Y: AsRef<W>>(
    &self,
    other: &Pattern<F, Y>,
    renaming: &mut HashMap<Z, W>
) -> bool where
    X: AsRef<Z> + PartialOrd<Y>,
    Z: Hash + Eq,
    W: Eq,
    F: PartialEq
[src]

Find a renaming from X -> Y so that both patterns are equals.

impl<F: Clone, X: Index> Pattern<F, X>[src]

pub fn reindex(&self) -> Pattern<F, X>[src]

Trait Implementations

impl<F, X> PatternLike<F, X> for Pattern<F, X>[src]

impl<F, X> From<PatternKind<F, X>> for Pattern<F, X>[src]

impl<F, X> From<X> for Pattern<F, X>[src]

impl<F: PartialEq, X: PartialEq> PartialEq<Pattern<F, X>> for Pattern<F, X>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<F: Clone, X: Clone> Clone for Pattern<F, X>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<F: PartialEq + Eq, X: PartialEq + Eq> Eq for Pattern<F, X>[src]

impl<F: Display, X: Display> Display for Pattern<F, X>[src]

impl<F: Debug, X: Debug> Debug for Pattern<F, X>[src]

impl<F: Hash, X: Hash> Hash for Pattern<F, X>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<F, X> Unpin for Pattern<F, X> where
    F: Unpin,
    X: Unpin

impl<F, X> Send for Pattern<F, X> where
    F: Send + Sync,
    X: Send + Sync

impl<F, X> Sync for Pattern<F, X> where
    F: Send + Sync,
    X: Send + Sync

impl<F, X> UnwindSafe for Pattern<F, X> where
    F: RefUnwindSafe + UnwindSafe,
    X: RefUnwindSafe + UnwindSafe

impl<F, X> RefUnwindSafe for Pattern<F, X> where
    F: RefUnwindSafe,
    X: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,