pub enum Lit {
Null,
Boolean(bool),
Integer(i64),
Decimal(String),
String(String),
Collection(Collection),
Verdict(Verdict),
}Variants§
Null
Boolean(bool)
Integer(i64)
Decimal(String)
The decimal’s source text, kept verbatim.
String(String)
Collection(Collection)
Verdict(Verdict)
Implementations§
Source§impl Lit
impl Lit
pub fn kind(&self) -> LitKind
pub fn decimal(text: impl Into<String>) -> Lit
pub fn string(value: impl Into<String>) -> Lit
pub fn list(items: impl IntoIterator<Item = Lit>) -> Lit
Sourcepub fn map(entries: impl IntoIterator<Item = (String, Lit)>) -> Lit
pub fn map(entries: impl IntoIterator<Item = (String, Lit)>) -> Lit
A map literal, as pairs sorted by key with a stable sort.
pub fn verdict( outcome: impl Into<String>, reason: impl Into<String>, invariant_code: impl Into<String>, ) -> Lit
Trait Implementations§
impl Eq for Lit
impl StructuralPartialEq for Lit
Auto Trait Implementations§
impl Forget for Lit
impl Freeze for Lit
impl Move for Lit
impl RefUnwindSafe for Lit
impl Send for Lit
impl Sync for Lit
impl Unpin for Lit
impl UnsafeUnpin for Lit
impl UnwindSafe for Lit
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.