Struct datafu::Pattern[][src]

pub struct Pattern<T: PatternTypes> { /* fields omitted */ }

Implementations

impl<T: PatternTypes> Pattern<T>[src]

pub fn compile<'s, P, O>(
    input: &'s str,
    preds: Option<BTreeMap<P, Box<Predicate<T>>>>,
    objs: Option<BTreeMap<O, T::Own>>
) -> Result<Self, PatternError<'s>> where
    P: Borrow<str> + Ord,
    O: Borrow<str> + Ord
[src]

Compiles the input into a pattern.

pub fn attempt_match<'a, 'b>(
    &'a self,
    value: impl Into<RefOwn<'b, T::Ref, T::Own>>
) -> Matcher<'a, 'b, T>

Notable traits for Matcher<'a, 'b, T>

impl<'a, 'b, T: PatternTypes> Iterator for Matcher<'a, 'b, T> type Item = Result<BTreeMap<&'a str, KVPair<'b, T>>, MatchError>;
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Pattern<T>

impl<T> Send for Pattern<T> where
    <T as PatternTypes>::Own: Send

impl<T> Sync for Pattern<T> where
    <T as PatternTypes>::Own: Sync

impl<T> Unpin for Pattern<T> where
    <T as PatternTypes>::Own: Unpin

impl<T> !UnwindSafe for Pattern<T>

Blanket Implementations

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

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

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

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

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

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.