pub enum DerivationRole {
Matched,
Differed,
AtConstructor,
Combine,
}Expand description
Which binding of a derivation a value is. The type each has is the one
the chapter
gives it, over Derivation::result and Position.
Variants§
Matched
matched : R.
Differed
differed : Position -> Position -> R.
AtConstructor
atConstructor : Position -> R.
Combine
combine : R -> R -> R.
Implementations§
Source§impl DerivationRole
impl DerivationRole
Sourcepub fn parameters(&self) -> usize
pub fn parameters(&self) -> usize
How many parameters the binding may be written with: the arguments the walk supplies it. A binding written with fewer is applied to the rest, and one written with more would need a function to be built from the walk, which canonical code has no form for.
Trait Implementations§
Source§impl Clone for DerivationRole
impl Clone for DerivationRole
Source§fn clone(&self) -> DerivationRole
fn clone(&self) -> DerivationRole
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 moreimpl Copy for DerivationRole
Source§impl Debug for DerivationRole
impl Debug for DerivationRole
impl Eq for DerivationRole
Source§impl Hash for DerivationRole
impl Hash for DerivationRole
Source§impl PartialEq for DerivationRole
impl PartialEq for DerivationRole
impl StructuralPartialEq for DerivationRole
Auto Trait Implementations§
impl Freeze for DerivationRole
impl RefUnwindSafe for DerivationRole
impl Send for DerivationRole
impl Sync for DerivationRole
impl Unpin for DerivationRole
impl UnsafeUnpin for DerivationRole
impl UnwindSafe for DerivationRole
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more