[−][src]Enum packs::value::Value
A type for all possible values which can be serialized through PackStream.
This type abstracts over structure types, which allows the user to define
their own structures which should be part of Value
. There are two standard
implementations, either Value<()>
to denote a value where only the unit is
allowed as a structure, or Value<GenericStruct>
which reads any valid structure
in a generic way, see GenericStruct
.
Variants
Boolean(bool)
Integer(i64)
Float(f64)
Bytes(Bytes)
String(String)
Trait Implementations
impl<S: Clone> Clone for Value<S>
[src]
impl<S: Debug> Debug for Value<S>
[src]
impl<S, '_> From<&'_ str> for Value<S>
[src]
impl<S> From<String> for Value<S>
[src]
impl<S> From<bool> for Value<S>
[src]
impl<S> From<f64> for Value<S>
[src]
impl<S> From<i64> for Value<S>
[src]
impl<T: Write, S: PackableStructSum> Pack<T> for Value<S>
[src]
impl<S: PartialEq> PartialEq<Value<S>> for Value<S>
[src]
impl<S> StructuralPartialEq for Value<S>
[src]
impl<T: Read, S: PackableStructSum> Unpack<T> for Value<S>
[src]
fn decode(reader: &mut T) -> Result<Self, DecodeError>
[src]
Auto Trait Implementations
impl<S> RefUnwindSafe for Value<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for Value<S> where
S: Send,
S: Send,
impl<S> Sync for Value<S> where
S: Sync,
S: Sync,
impl<S> Unpin for Value<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for Value<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<S, T> Pack<T> for S where
S: PackableStructSum,
T: Write,
[src]
S: PackableStructSum,
T: Write,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> Unpack<T> for S where
S: PackableStructSum,
T: Read,
[src]
S: PackableStructSum,
T: Read,