[][src]Struct forest_vm::Serialized

pub struct Serialized { /* fields omitted */ }

Serialized bytes to be used as parameters into actor methods

Implementations

impl Serialized[src]

pub fn new(bytes: Vec<u8>) -> Self[src]

Constructor if data is encoded already

pub fn serialize<O: Serialize>(obj: O) -> Result<Self, EncodingError>[src]

Contructor for encoding Cbor encodable structure

pub fn bytes(&self) -> &[u8][src]

Returns serialized bytes

pub fn deserialize<O: DeserializeOwned>(&self) -> Result<O, EncodingError>[src]

Deserializes into a defined type

Trait Implementations

impl Cbor for Serialized[src]

impl Clone for Serialized[src]

impl Debug for Serialized[src]

impl Default for Serialized[src]

impl Deref for Serialized[src]

type Target = Vec<u8>

The resulting type after dereferencing.

impl<'de> Deserialize<'de> for Serialized[src]

impl Eq for Serialized[src]

impl Hash for Serialized[src]

impl PartialEq<Serialized> for Serialized[src]

impl Serialize for Serialized[src]

impl StructuralEq for Serialized[src]

impl StructuralPartialEq for Serialized[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.