Struct preserves::value::repr::IOValue

source ·
pub struct IOValue(/* private fields */);
Expand description

A representation of a Preserves Value using Arc for reference-counting of subvalues and having IOValue as NestedValue::Embedded.

Trait Implementations§

source§

impl Clone for IOValue

source§

fn clone(&self) -> IOValue

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 Debug for IOValue

source§

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

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

impl<'de> Deserialize<'de> for IOValue

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Domain for IOValue

source§

impl DomainDecode<IOValue> for IOValueDomainCodec

source§

fn decode_embedded<'de, 'src, S: BinarySource<'de>>( &mut self, src: &'src mut S, read_annotations: bool ) -> Result<IOValue>

source§

impl DomainEncode<IOValue> for IOValueDomainCodec

source§

fn encode_embedded<W: Writer>(&mut self, w: &mut W, d: &IOValue) -> Result<()>

source§

impl FromStr for IOValue

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for IOValue

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl NestedValue for IOValue

§

type Embedded = IOValue

Every representation of Preserves values has an associated type: that of the Rust data able to be embedded inside a value.
source§

fn wrap(anns: Annotations<Self>, v: Value<Self>) -> Self

Attaches the given Annotations to the Value.
source§

fn annotations(&self) -> &Annotations<Self>

Retrieves any annotations attached to self.
source§

fn value(&self) -> &Value<Self>

Retrieves the underlying Value represented by self.
source§

fn pieces(self) -> (Annotations<Self>, Value<Self>)

Consumes self, yielding its annotations and underlying Value.
source§

fn value_owned(self) -> Value<Self>

Consumes self, yielding its underlying Value and discarding its annotations.
source§

fn new<V>(v: V) -> Self
where Value<Self>: From<V>,

v can be converted to a Value; new does this and then wraps it to yield an instance of Self.
source§

fn domain<E>(e: E) -> Self
where Self::Embedded: From<E>,

Embeds e to a Preserves embedded value; e is first converted to Self::Embedded.
source§

fn symbol(n: &str) -> Self

Yields a Preserves Symbol embodying the given text, n.
source§

fn bytestring<'a, V: Into<Cow<'a, [u8]>>>(v: V) -> Self

Yields a Preserves ByteString.
source§

fn value_class(&self) -> ValueClass

Retrieves the ValueClass of self.
source§

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

Supplies an opportunity to customize debug formatting for self. Defaults to writing @-prefixed annotations followed by the underlying value.
source§

fn strip_annotations<M: NestedValue<Embedded = Self::Embedded>>(&self) -> M

Yields a deep copy of self with all annotations (recursively) removed.
source§

fn copy_via<M: NestedValue, F, Err>(&self, f: &mut F) -> Result<M, Err>
where F: FnMut(&Self::Embedded) -> Result<Value<M>, Err>,

Yields a deep copy of self, mapping embedded values to a new type via f.
source§

fn foreach_embedded<F, Err>(&self, f: &mut F) -> Result<(), Err>
where F: FnMut(&Self::Embedded) -> Result<(), Err>,

Calls f once for each (recursively) embedded Self::Embedded value in self.
source§

impl Ord for IOValue

source§

fn cmp(&self, other: &IOValue) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for IOValue

source§

fn eq(&self, other: &IOValue) -> 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 PartialOrd for IOValue

source§

fn partial_cmp(&self, other: &IOValue) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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 more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for IOValue

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for IOValue

source§

impl StructuralPartialEq for IOValue

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where 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> ToOwned for T
where 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 T
where 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> TryInto<U> for T
where 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> Embeddable for T
where T: Domain + Clone,