[][src]Struct kul_core::parser::premade::PairOperatorBindings

pub struct PairOperatorBindings<P, DA, OR, AR, CE> where
    P: Borrow<[(Datum<DA::TT, DA::ET, DA::DR>, Combiner<OR, AR>)]>,
    DA: DatumAllocator
{ pub pairs: P, // some fields omitted }

An OperatorBindings that associates generic Datums with generic Combiners, using a slice of pairs (2-tuples) of them.

The Datum values represent parsed operator sub-forms (of non-empty nest forms) that are bound to macro functions represented by the Combiner values.

You are responsible for initializing the slice with the desired bindings, and it may be dynamically mutated inbetween parser invocations, if desired and if you use a mutable type for it.

Fields

pairs: P

The bindings of operators to macros. You must initialize and manage this yourself.

Methods

impl<P, DA, OR, AR, CE> PairOperatorBindings<P, DA, OR, AR, CE> where
    P: Borrow<[(Datum<DA::TT, DA::ET, DA::DR>, Combiner<OR, AR>)]>,
    DA: DatumAllocator
[src]

pub fn new(pairs: P) -> Self[src]

Given a value of a type that can borrow as a slice of pairs (2-tuples) of Datums with Combiners, make a new instance of Self that uses it for its bindings.

Trait Implementations

impl<P, DA, OR, AR, CE> OperatorBindings<DA> for PairOperatorBindings<P, DA, OR, AR, CE> where
    P: Borrow<[(Datum<DA::TT, DA::ET, DA::DR>, Combiner<OR, AR>)]>,
    DA: DatumAllocator,
    Datum<DA::TT, DA::ET, DA::DR>: PartialEq,
    OR: Deref<Target = OpFn<DA, CE>>,
    AR: Deref<Target = ApFn<DA, CE>>, 
[src]

type OR = OR

The type of references to Operative macro functions. Read more

type AR = AR

The type of references to Applicative macro functions. Read more

type CE = CE

The combiner error extension type. Read more

impl<P: Debug, DA: Debug, OR: Debug, AR: Debug, CE: Debug> Debug for PairOperatorBindings<P, DA, OR, AR, CE> where
    P: Borrow<[(Datum<DA::TT, DA::ET, DA::DR>, Combiner<OR, AR>)]>,
    DA: DatumAllocator
[src]

impl<P, DA, OR, AR, CE> Default for PairOperatorBindings<P, DA, OR, AR, CE> where
    P: Default + Borrow<[(Datum<DA::TT, DA::ET, DA::DR>, Combiner<OR, AR>)]>,
    DA: DatumAllocator
[src]

fn default() -> Self[src]

Make a new instance of Self using the Default::default() of our pairs' type.

Auto Trait Implementations

impl<P, DA, OR, AR, CE> !Send for PairOperatorBindings<P, DA, OR, AR, CE>

impl<P, DA, OR, AR, CE> !Sync for PairOperatorBindings<P, DA, OR, AR, CE>

Blanket Implementations

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto 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, U> Into for T where
    U: From<T>, 
[src]

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

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

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