Enum json_ld_core::object::value::Literal
source · pub enum Literal {
Null,
Boolean(bool),
Number(NumberBuf),
String(LiteralString),
}
Expand description
Literal value.
Variants§
Null
The null
value.
Boolean(bool)
Boolean value.
Number(NumberBuf)
Number.
String(LiteralString)
String.
Implementations§
source§impl Literal
impl Literal
pub fn into_json<M>(self) -> Value<M>
sourcepub fn canonicalize_with(&mut self, buffer: &mut Buffer)
pub fn canonicalize_with(&mut self, buffer: &mut Buffer)
Puts this literal into canonical form using the given buffer
.
The buffer is used to compute the canonical form of numbers.
sourcepub fn canonicalize(&mut self)
pub fn canonicalize(&mut self)
Puts this literal into canonical form.
Trait Implementations§
source§impl Ord for Literal
impl Ord for Literal
source§impl PartialEq<Literal> for Literal
impl PartialEq<Literal> for Literal
source§impl PartialOrd<Literal> for Literal
impl PartialOrd<Literal> for Literal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PrecomputeSize for Literal
impl PrecomputeSize for Literal
source§impl Print for Literal
impl Print for Literal
fn fmt_with( &self, f: &mut Formatter<'_>, options: &Options, indent: usize ) -> Result
source§fn pretty_print(&self) -> Printed<'_, Self>
fn pretty_print(&self) -> Printed<'_, Self>
Print the value with
Options::pretty
options.source§fn compact_print(&self) -> Printed<'_, Self>
fn compact_print(&self) -> Printed<'_, Self>
Print the value with
Options::compact
options.source§fn inline_print(&self) -> Printed<'_, Self>
fn inline_print(&self) -> Printed<'_, Self>
Print the value with
Options::inline
options.source§fn print_with(&self, options: Options) -> Printed<'_, Self>
fn print_with(&self, options: Options) -> Printed<'_, Self>
Print the value with the given options.
impl Eq for Literal
impl StructuralEq for Literal
impl StructuralPartialEq for Literal
Auto Trait Implementations§
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin for Literal
impl UnwindSafe for Literal
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.