Trait FromXdr

Source
pub trait FromXdr<'de, T: Deserialize<'de>>: Sized {
    // Required method
    fn from_xdr(other: T) -> Result<Self>;

    // Provided methods
    fn from_reader<R: Read>(r: &mut R) -> Result<Self> { ... }
    fn from_base64(input: &str) -> Result<Self> { ... }
}
Expand description

A trait to try and deserialize an XDR object into some type.

Required Methods§

Source

fn from_xdr(other: T) -> Result<Self>

Build the type from the XDR other object .

Provided Methods§

Source

fn from_reader<R: Read>(r: &mut R) -> Result<Self>

Deserialize from a reader r.

Source

fn from_base64(input: &str) -> Result<Self>

Deserialize from base64.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§