pub enum Value<M> {
    One(Meta<Context<Definition<M, Self>>, M>),
    Many(Vec<Meta<Context<Definition<M, Self>>, M>>),
}
Expand description

Context entry.

Variants§

§

One(Meta<Context<Definition<M, Self>>, M>)

§

Many(Vec<Meta<Context<Definition<M, Self>>, M>>)

Implementations§

source§

impl<M> Value<M>

source

pub fn as_slice(&self) -> &[Meta<Context<Definition<M, Self>>, M>]

source

pub fn traverse(&self) -> Traverse<'_, M, Self> where M: Clone + Send + Sync,

Trait Implementations§

source§

impl<M: Clone + Send + Sync> AnyValue<M> for Value<M>

§

type Definition = Definition<M, Value<M>>

source§

fn as_value_ref(&self) -> ValueRef<'_, M, Self::Definition>

source§

fn traverse(&self) -> Traverse<'_, M, Self>

source§

impl<M> AnyValueMut for Value<M>

source§

fn append(&mut self, context: Self)

source§

impl<M: Clone> Clone for Value<M>

source§

fn clone(&self) -> Value<M>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<M: Debug> Debug for Value<M>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, M: Clone> From<&'a Value<M>> for ValueRef<'a, M, Definition<M>>

source§

fn from(e: &'a Value<M>) -> Self

Converts to this type from the input type.
source§

impl<M: Default> From<Context<Definition<M, Value<M>>>> for Value<M>

source§

fn from(c: Context<Definition<M, Self>>) -> Self

Converts to this type from the input type.
source§

impl<M: Default> From<Definition<M, Value<M>>> for Value<M>

source§

fn from(c: Definition<M, Self>) -> Self

Converts to this type from the input type.
source§

impl<'a, M: Default> From<Iri<'a>> for Value<M>

source§

fn from(i: Iri<'a>) -> Self

Converts to this type from the input type.
source§

impl<M: Default> From<IriBuf> for Value<M>

source§

fn from(i: IriBuf) -> Self

Converts to this type from the input type.
source§

impl<'a, M: Default> From<IriRef<'a>> for Value<M>

source§

fn from(i: IriRef<'a>) -> Self

Converts to this type from the input type.
source§

impl<M: Default> From<IriRefBuf> for Value<M>

source§

fn from(i: IriRefBuf) -> Self

Converts to this type from the input type.
source§

impl<M> From<Meta<Context<Definition<M, Value<M>>>, M>> for Value<M>

source§

fn from(c: Meta<Context<Definition<M, Self>>, M>) -> Self

Converts to this type from the input type.
source§

impl<'a, M> From<Meta<Iri<'a>, M>> for Value<M>

source§

fn from(Meta: Meta<Iri<'a>, M>) -> Self

Converts to this type from the input type.
source§

impl<M> From<Meta<IriBuf, M>> for Value<M>

source§

fn from(Meta: Meta<IriBuf, M>) -> Self

Converts to this type from the input type.
source§

impl<'a, M> From<Meta<IriRef<'a>, M>> for Value<M>

source§

fn from(Meta: Meta<IriRef<'a>, M>) -> Self

Converts to this type from the input type.
source§

impl<M> From<Meta<IriRefBuf, M>> for Value<M>

source§

fn from(Meta: Meta<IriRefBuf, M>) -> Self

Converts to this type from the input type.
source§

impl<M> IntoJsonMeta<M> for Value<M>

source§

fn into_json_meta(self, meta: M) -> Meta<Value<M>, M>

source§

impl<M: PartialEq> PartialEq<Value<M>> for Value<M>

source§

fn eq(&self, other: &Value<M>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<M: Clone + Send + Sync> PrecomputeSize for Value<M>

source§

fn pre_compute_size(&self, options: &Options, sizes: &mut Vec<Size>) -> Size

source§

impl<M: Clone + Send + Sync> Print for Value<M>

source§

fn fmt_with( &self, f: &mut Formatter<'_>, options: &Options, indent: usize ) -> Result

source§

fn pretty_print(&self) -> Printed<'_, Self>

Print the value with Options::pretty options.
source§

fn compact_print(&self) -> Printed<'_, Self>

Print the value with Options::compact options.
source§

fn inline_print(&self) -> Printed<'_, Self>

Print the value with Options::inline options.
source§

fn print_with(&self, options: Options) -> Printed<'_, Self>

Print the value with the given options.
source§

impl<M: Clone + Send + Sync> PrintWithSize for Value<M>

source§

fn fmt_with_size( &self, f: &mut Formatter<'_>, options: &Options, indent: usize, sizes: &[Size], index: &mut usize ) -> Result

source§

impl<M, __M> StrippedPartialEq<Value<__M>> for Value<M>

source§

fn stripped_eq(&self, other: &Value<__M>) -> bool

source§

impl<M: Clone> TryFromJson<M> for Value<M>

source§

impl<M: Eq> Eq for Value<M>

source§

impl<M> StructuralEq for Value<M>

source§

impl<M> StructuralPartialEq for Value<M>

Auto Trait Implementations§

§

impl<M> RefUnwindSafe for Value<M>where M: RefUnwindSafe,

§

impl<M> Send for Value<M>where M: Send,

§

impl<M> Sync for Value<M>where M: Sync,

§

impl<M> Unpin for Value<M>where M: Unpin,

§

impl<M> UnwindSafe for Value<M>where M: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> At for T

source§

fn at<M>(self, metadata: M) -> Meta<T, M>

Wraps self inside a Meta<Self, M> using the given metadata. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowStripped for T

source§

fn stripped(&self) -> &Stripped<T>

source§

impl<T> BorrowUnordered for T

source§

fn unordered(&self) -> &Unordered<T>

source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, C> FromWithContext<T, C> for T

source§

fn from_with(value: T, _context: &C) -> T

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U, C> IntoWithContext<U, C> for Twhere U: FromWithContext<T, C>,

source§

fn into_with(self, context: &C) -> U

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U, C> TryFromWithContext<U, C> for Twhere U: IntoWithContext<T, C>,

§

type Error = Infallible

source§

fn try_from_with( value: U, context: &C ) -> Result<T, <T as TryFromWithContext<U, C>>::Error>

source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, U, C> TryIntoWithContext<U, C> for Twhere U: TryFromWithContext<T, C>,

§

type Error = <U as TryFromWithContext<T, C>>::Error

source§

fn try_into_with( self, context: &C ) -> Result<U, <T as TryIntoWithContext<U, C>>::Error>

source§

impl<T> WithContext for Twhere T: ?Sized,

source§

fn with<C>(&self, context: C) -> Contextual<&T, C>

source§

fn into_with<C>(self, context: C) -> Contextual<T, C>