soroban_sdk::xdr

Trait FromXdr

Source
pub trait FromXdr: Sized {
    type Error;

    // Required method
    fn from_xdr(env: &Env, b: &Bytes) -> Result<Self, Self::Error>;
}
Expand description

Implemented by types that can be deserialized from Bytes.

All types that are convertible from Val are implemented.

Required Associated Types§

Required Methods§

Source

fn from_xdr(env: &Env, b: &Bytes) -> Result<Self, Self::Error>

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§

Source§

impl<T> FromXdr for T
where T: TryFromVal<Env, Val>,