[−][src]Enum kul_core::datum::Datum
The abstract syntax tree (AST) type returned by parsing. It is extensible
by the ExtraType
parameter, and it is parameterized over the DatumRef
type used to refer to the other Datum
s in an AST. It can also be used for
DAGs.
Variants
Text(TextType)
A logically unbroken span of text. (Only nest forms break text logically, but escape characters break the representation into chunks.)
Combination
A nest form that is not empty and so has a non-empty "operator"/"head" sub-form and has a possibly-empty "operands" sub-form(s).
Fields of Combination
EmptyNest
An empty nest form
List
A list of other Datum
s. Used to represent parsed operands.
Fields of List
EmptyList
An empty list
Extra(ExtraType)
Extensibility that custom macros/combiners may utilize to add additional variants
Trait Implementations
impl<TT1, TT2, ET1, ET2, DR1, DR2> PartialEq<Datum<TT2, ET2, DR2>> for Datum<TT1, ET1, DR1> where
DR1: DerefTryMut<Target = Datum<TT1, ET1, DR1>>,
DR2: DerefTryMut<Target = Datum<TT2, ET2, DR2>>,
TT1: PartialEq<TT2>,
ET1: PartialEq<ET2>,
[src]
DR1: DerefTryMut<Target = Datum<TT1, ET1, DR1>>,
DR2: DerefTryMut<Target = Datum<TT2, ET2, DR2>>,
TT1: PartialEq<TT2>,
ET1: PartialEq<ET2>,
This allows different concrete Datum
types to be
compared with each other for equality if their "extra"
types can be. This also avoids stack
overflows for long lists and deep nests (but can still overflow on other
deep tree shapes, but those are rare).
fn eq(&self, other: &Datum<TT2, ET2, DR2>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<TextType: Eq, ExtraType: Eq, DatumRef: Eq> Eq for Datum<TextType, ExtraType, DatumRef> where
DatumRef: DerefTryMut<Target = Datum<TextType, ExtraType, DatumRef>>,
[src]
DatumRef: DerefTryMut<Target = Datum<TextType, ExtraType, DatumRef>>,
impl<TextType: Debug, ExtraType: Debug, DatumRef: Debug> Debug for Datum<TextType, ExtraType, DatumRef> where
DatumRef: DerefTryMut<Target = Datum<TextType, ExtraType, DatumRef>>,
[src]
DatumRef: DerefTryMut<Target = Datum<TextType, ExtraType, DatumRef>>,
impl<TextType: Hash, ExtraType: Hash, DatumRef: Hash> Hash for Datum<TextType, ExtraType, DatumRef> where
DatumRef: DerefTryMut<Target = Datum<TextType, ExtraType, DatumRef>>,
[src]
DatumRef: DerefTryMut<Target = Datum<TextType, ExtraType, DatumRef>>,
fn hash<__HTextTypeExtraTypeDatumRef: Hasher>(
&self,
state: &mut __HTextTypeExtraTypeDatumRef
)
[src]
&self,
state: &mut __HTextTypeExtraTypeDatumRef
)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<TextType: Copy, ExtraType: Copy, DatumRef: Copy> Copy for Datum<TextType, ExtraType, DatumRef> where
DatumRef: DerefTryMut<Target = Datum<TextType, ExtraType, DatumRef>>,
[src]
DatumRef: DerefTryMut<Target = Datum<TextType, ExtraType, DatumRef>>,
impl<TextType: Clone, ExtraType: Clone, DatumRef: Clone> Clone for Datum<TextType, ExtraType, DatumRef> where
DatumRef: DerefTryMut<Target = Datum<TextType, ExtraType, DatumRef>>,
[src]
DatumRef: DerefTryMut<Target = Datum<TextType, ExtraType, DatumRef>>,
Auto Trait Implementations
impl<TextType, ExtraType, DatumRef> Send for Datum<TextType, ExtraType, DatumRef> where
DatumRef: Send,
ExtraType: Send,
TextType: Send,
DatumRef: Send,
ExtraType: Send,
TextType: Send,
impl<TextType, ExtraType, DatumRef> Sync for Datum<TextType, ExtraType, DatumRef> where
DatumRef: Sync,
ExtraType: Sync,
TextType: Sync,
DatumRef: Sync,
ExtraType: Sync,
TextType: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,