pub trait BorshDeserialize: Sized {
    // Required method
    fn deserialize_reader<R>(reader: &mut R) -> Result<Self, Error>
       where R: Read;

    // Provided methods
    fn deserialize(buf: &mut &[u8]) -> Result<Self, Error> { ... }
    fn try_from_slice(v: &[u8]) -> Result<Self, Error> { ... }
    fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>
       where R: Read { ... }
}
Expand description

A data-structure that can be de-serialized from binary format by NBOR.

Required Methods§

fn deserialize_reader<R>(reader: &mut R) -> Result<Self, Error>
where R: Read,

Provided Methods§

fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.

fn try_from_slice(v: &[u8]) -> Result<Self, Error>

Deserialize this instance from a slice of bytes.

fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>
where R: Read,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl BorshDeserialize for SocketAddr

§

fn deserialize_reader<R>(reader: &mut R) -> Result<SocketAddr, Error>
where R: Read,

§

impl BorshDeserialize for bool

§

fn deserialize_reader<R>(reader: &mut R) -> Result<bool, Error>
where R: Read,

§

impl BorshDeserialize for f32

§

fn deserialize_reader<R>(reader: &mut R) -> Result<f32, Error>
where R: Read,

§

impl BorshDeserialize for f64

§

fn deserialize_reader<R>(reader: &mut R) -> Result<f64, Error>
where R: Read,

§

impl BorshDeserialize for i8

§

fn deserialize_reader<R>(reader: &mut R) -> Result<i8, Error>
where R: Read,

§

impl BorshDeserialize for i16

§

fn deserialize_reader<R>(reader: &mut R) -> Result<i16, Error>
where R: Read,

§

impl BorshDeserialize for i32

§

fn deserialize_reader<R>(reader: &mut R) -> Result<i32, Error>
where R: Read,

§

impl BorshDeserialize for i64

§

fn deserialize_reader<R>(reader: &mut R) -> Result<i64, Error>
where R: Read,

§

impl BorshDeserialize for i128

§

fn deserialize_reader<R>(reader: &mut R) -> Result<i128, Error>
where R: Read,

§

impl BorshDeserialize for isize

§

fn deserialize_reader<R>(reader: &mut R) -> Result<isize, Error>
where R: Read,

§

impl BorshDeserialize for u8

§

fn deserialize_reader<R>(reader: &mut R) -> Result<u8, Error>
where R: Read,

§

impl BorshDeserialize for u16

§

fn deserialize_reader<R>(reader: &mut R) -> Result<u16, Error>
where R: Read,

§

impl BorshDeserialize for u32

§

fn deserialize_reader<R>(reader: &mut R) -> Result<u32, Error>
where R: Read,

§

impl BorshDeserialize for u64

§

fn deserialize_reader<R>(reader: &mut R) -> Result<u64, Error>
where R: Read,

§

impl BorshDeserialize for u128

§

fn deserialize_reader<R>(reader: &mut R) -> Result<u128, Error>
where R: Read,

§

impl BorshDeserialize for ()

§

fn deserialize_reader<R>(_reader: &mut R) -> Result<(), Error>
where R: Read,

§

impl BorshDeserialize for usize

§

fn deserialize_reader<R>(reader: &mut R) -> Result<usize, Error>
where R: Read,

§

impl BorshDeserialize for Ipv4Addr

§

fn deserialize_reader<R>(reader: &mut R) -> Result<Ipv4Addr, Error>
where R: Read,

§

impl BorshDeserialize for Ipv6Addr

§

fn deserialize_reader<R>(reader: &mut R) -> Result<Ipv6Addr, Error>
where R: Read,

§

impl BorshDeserialize for SocketAddrV4

§

impl BorshDeserialize for SocketAddrV6

§

impl BorshDeserialize for NonZero<i8>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<NonZero<i8>, Error>
where R: Read,

§

impl BorshDeserialize for NonZero<i16>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<NonZero<i16>, Error>
where R: Read,

§

impl BorshDeserialize for NonZero<i32>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<NonZero<i32>, Error>
where R: Read,

§

impl BorshDeserialize for NonZero<i64>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<NonZero<i64>, Error>
where R: Read,

§

impl BorshDeserialize for NonZero<i128>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<NonZero<i128>, Error>
where R: Read,

§

impl BorshDeserialize for NonZero<u8>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<NonZero<u8>, Error>
where R: Read,

§

impl BorshDeserialize for NonZero<u16>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<NonZero<u16>, Error>
where R: Read,

§

impl BorshDeserialize for NonZero<u32>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<NonZero<u32>, Error>
where R: Read,

§

impl BorshDeserialize for NonZero<u64>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<NonZero<u64>, Error>
where R: Read,

§

impl BorshDeserialize for NonZero<u128>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<NonZero<u128>, Error>
where R: Read,

§

impl BorshDeserialize for NonZero<usize>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<NonZero<usize>, Error>
where R: Read,

§

impl<T0> BorshDeserialize for (T0,)
where T0: BorshDeserialize,

§

fn deserialize_reader<R>(reader: &mut R) -> Result<(T0,), Error>
where R: Read,

§

impl<T0, T1> BorshDeserialize for (T0, T1)

§

fn deserialize_reader<R>(reader: &mut R) -> Result<(T0, T1), Error>
where R: Read,

§

impl<T0, T1, T2> BorshDeserialize for (T0, T1, T2)

§

impl<T0, T1, T2, T3> BorshDeserialize for (T0, T1, T2, T3)

§

impl<T0, T1, T2, T3, T4> BorshDeserialize for (T0, T1, T2, T3, T4)

§

impl<T0, T1, T2, T3, T4, T5> BorshDeserialize for (T0, T1, T2, T3, T4, T5)

§

impl<T0, T1, T2, T3, T4, T5, T6> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19> BorshDeserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)

§

impl<T> BorshDeserialize for Option<T>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<Option<T>, Error>
where R: Read,

§

impl<T> BorshDeserialize for PhantomData<T>
where T: ?Sized,

§

impl<T> BorshDeserialize for Range<T>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<Range<T>, Error>
where R: Read,

§

impl<T, E> BorshDeserialize for Result<T, E>

§

fn deserialize_reader<R>(reader: &mut R) -> Result<Result<T, E>, Error>
where R: Read,

§

impl<T, const N: usize> BorshDeserialize for [T; N]

§

fn deserialize_reader<R>(reader: &mut R) -> Result<[T; N], Error>
where R: Read,

Implementors§

source§

impl BorshDeserialize for AggregatorResolutionMode

source§

impl BorshDeserialize for OracleResponseType

source§

impl BorshDeserialize for SwitchboardPermission

§

impl BorshDeserialize for StakeState

§

impl BorshDeserialize for StakeStateV2

§

impl BorshDeserialize for Definition

§

impl BorshDeserialize for Fields

source§

impl BorshDeserialize for BorshDecimal

source§

impl BorshDeserialize for SwitchboardDecimal

source§

impl BorshDeserialize for BufferRelayerAccountData

source§

impl BorshDeserialize for BufferRelayerRound

source§

impl BorshDeserialize for JobAccountData

source§

impl BorshDeserialize for AggregatorSaveResultParams

source§

impl BorshDeserialize for OracleHeartbeatParams

source§

impl BorshDeserialize for PermissionSetParams

§

impl BorshDeserialize for StakeFlags

§

impl BorshDeserialize for Authorized

§

impl BorshDeserialize for Delegation

§

impl BorshDeserialize for Lockup

§

impl BorshDeserialize for Meta

§

impl BorshDeserialize for Stake

§

impl BorshDeserialize for Pubkey

§

impl BorshDeserialize for String

§

impl BorshDeserialize for BorshSchemaContainer

§

impl<K, V> BorshDeserialize for BTreeMap<K, V>

§

impl<K, V, H> BorshDeserialize for HashMap<K, V, H>

§

impl<T> BorshDeserialize for Cow<'_, T>
where T: ToOwned + ?Sized, <T as ToOwned>::Owned: BorshDeserialize,

§

impl<T> BorshDeserialize for BTreeSet<T>
where T: BorshDeserialize + Ord,

§

impl<T> BorshDeserialize for BinaryHeap<T>
where T: BorshDeserialize + Ord,

§

impl<T> BorshDeserialize for LinkedList<T>

§

impl<T> BorshDeserialize for VecDeque<T>

§

impl<T> BorshDeserialize for Vec<T>

§

impl<T, H> BorshDeserialize for HashSet<T, H>

§

impl<T, U> BorshDeserialize for Box<T>
where U: Into<Box<T>> + Borrow<T>, T: ToOwned<Owned = U> + ?Sized, <T as ToOwned>::Owned: BorshDeserialize,