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 BorshDeserialize for AssociatedTokenAccountInstruction

§

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

§

impl BorshDeserialize for Authorized

§

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

§

impl BorshDeserialize for Delegation

§

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

§

impl BorshDeserialize for Emit

§

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

§

impl BorshDeserialize for Field

§

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

§

impl BorshDeserialize for Initialize

§

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

§

impl BorshDeserialize for Lockup

§

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

§

impl BorshDeserialize for Meta

§

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

§

impl BorshDeserialize for OptionalNonZeroPubkey

§

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

§

impl BorshDeserialize for PodU32

§

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

§

impl BorshDeserialize for PodU64

§

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

§

impl BorshDeserialize for RemoveKey

§

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

§

impl BorshDeserialize for Stake

§

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

§

impl BorshDeserialize for StakeFlags

§

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

§

impl BorshDeserialize for StakeState

§

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

§

impl BorshDeserialize for StakeStateV2

§

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

§

impl BorshDeserialize for TokenMetadata

§

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

§

impl BorshDeserialize for UpdateAuthority
where OptionalNonZeroPubkey: BorshDeserialize,

§

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

§

impl BorshDeserialize for UpdateField

§

fn deserialize_reader<R>(reader: &mut R) -> Result<UpdateField, 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, 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 SwitchboardAttestationPermission

source§

impl BorshDeserialize for FunctionStatus

source§

impl BorshDeserialize for RequestStatus

source§

impl BorshDeserialize for RoutineStatus

source§

impl BorshDeserialize for EnclaveRotationStatus

source§

impl BorshDeserialize for ServiceStatus

source§

impl BorshDeserialize for ServerRegion

source§

impl BorshDeserialize for ServerZone

source§

impl BorshDeserialize for VerificationStatus

source§

impl BorshDeserialize for BoolWithLock

source§

impl BorshDeserialize for ResourceLevel

source§

impl BorshDeserialize for AggregatorResolutionMode

source§

impl BorshDeserialize for OracleResponseType

source§

impl BorshDeserialize for SwitchboardPermission

§

impl BorshDeserialize for Definition

§

impl BorshDeserialize for Fields

source§

impl BorshDeserialize for AttestationPermissionAccountData

source§

impl BorshDeserialize for AttestationProgramState

source§

impl BorshDeserialize for FunctionRequestAccountData

source§

impl BorshDeserialize for FunctionRequestTriggerRound

source§

impl BorshDeserialize for FunctionRoutineAccountData

source§

impl BorshDeserialize for FunctionServiceAccountData

source§

impl BorshDeserialize for ServiceRow

source§

impl BorshDeserialize for SwitchboardWallet

source§

impl BorshDeserialize for FunctionBootedEvent

source§

impl BorshDeserialize for FunctionFundEvent

source§

impl BorshDeserialize for FunctionInitEvent

source§

impl BorshDeserialize for FunctionRequestCloseEvent

source§

impl BorshDeserialize for FunctionRequestInitEvent

source§

impl BorshDeserialize for FunctionRequestTriggerEvent

source§

impl BorshDeserialize for FunctionRequestVerifyErrorEvent

source§

impl BorshDeserialize for FunctionRequestVerifyEvent

source§

impl BorshDeserialize for FunctionRoutineInitEvent

source§

impl BorshDeserialize for FunctionRoutineVerifyErrorEvent

source§

impl BorshDeserialize for FunctionRoutineVerifyEvent

source§

impl BorshDeserialize for FunctionServiceInitEvent

source§

impl BorshDeserialize for FunctionServiceVerifyErrorEvent

source§

impl BorshDeserialize for FunctionServiceVerifyEvent

source§

impl BorshDeserialize for FunctionSetConfigEvent

source§

impl BorshDeserialize for FunctionTriggerEvent

source§

impl BorshDeserialize for FunctionVerifyEvent

source§

impl BorshDeserialize for FunctionWithdrawEvent

source§

impl BorshDeserialize for GarbageCollectionEvent

source§

impl BorshDeserialize for PermissionInitEvent

source§

impl BorshDeserialize for PermissionSetEvent

source§

impl BorshDeserialize for QueueAddMrEnclaveEvent

source§

impl BorshDeserialize for QueueInitEvent

source§

impl BorshDeserialize for QueueRemoveMrEnclaveEvent

source§

impl BorshDeserialize for ServiceRequestQuoteVerifyEvent

source§

impl BorshDeserialize for ServiceWorkerAddServiceEvent

source§

impl BorshDeserialize for ServiceWorkerAddServiceRequestEvent

source§

impl BorshDeserialize for ServiceWorkerInitEvent

source§

impl BorshDeserialize for ServiceWorkerRemoveServiceEvent

source§

impl BorshDeserialize for ServiceWorkerUpdatedEvent

source§

impl BorshDeserialize for VerifierHeartbeatEvent

source§

impl BorshDeserialize for VerifierInitEvent

source§

impl BorshDeserialize for VerifierQuoteOverrideEvent

source§

impl BorshDeserialize for VerifierQuoteRotateEvent

source§

impl BorshDeserialize for VerifierQuoteVerifyEvent

source§

impl BorshDeserialize for VerifierQuoteVerifyRequestEvent

source§

impl BorshDeserialize for AttestationPermissionInitParams

source§

impl BorshDeserialize for AttestationPermissionSetParams

source§

impl BorshDeserialize for AttestationQueueAddMrEnclaveParams

source§

impl BorshDeserialize for AttestationQueueInitParams

source§

impl BorshDeserialize for FunctionCloseParams

source§

impl BorshDeserialize for FunctionInitParams

source§

impl BorshDeserialize for FunctionSetConfigParams

source§

impl BorshDeserialize for FunctionSetEscrowParams

source§

impl BorshDeserialize for FunctionTriggerParams

source§

impl BorshDeserialize for FunctionVerifyParams

source§

impl BorshDeserialize for FunctionRequestCloseParams

source§

impl BorshDeserialize for FunctionRequestInitParams

source§

impl BorshDeserialize for FunctionRequestInitAndTriggerParams

source§

impl BorshDeserialize for FunctionRequestSetConfigParams

source§

impl BorshDeserialize for FunctionRequestTriggerParams

source§

impl BorshDeserialize for FunctionRequestVerifyParams

source§

impl BorshDeserialize for FunctionRoutineInitParams

source§

impl BorshDeserialize for FunctionRoutineVerifyParams

source§

impl BorshDeserialize for ServiceRequestQuoteVerifyParams

source§

impl BorshDeserialize for FunctionServiceVerifyParams

source§

impl BorshDeserialize for VerifierHeartbeatParams

source§

impl BorshDeserialize for VerifierInitParams

source§

impl BorshDeserialize for VerifierQuoteRotateParams

source§

impl BorshDeserialize for VerifierQuoteVerifyParams

source§

impl BorshDeserialize for WalletFundParams

source§

impl BorshDeserialize for WalletInitParams

source§

impl BorshDeserialize for WalletWithdrawParams

source§

impl BorshDeserialize for BootstrapAttestationQueueParams

source§

impl BorshDeserialize for BorshQuote

source§

impl BorshDeserialize for BorshDecimal

source§

impl BorshDeserialize for SwitchboardDecimal

source§

impl BorshDeserialize for BufferRelayerAccountData

source§

impl BorshDeserialize for BufferRelayerRound

source§

impl BorshDeserialize for AccountMetaBorsh

source§

impl BorshDeserialize for Callback

source§

impl BorshDeserialize for JobAccountData

source§

impl BorshDeserialize for AggregatorSaveResultParams

source§

impl BorshDeserialize for OracleHeartbeatParams

source§

impl BorshDeserialize for PermissionSetParams

source§

impl BorshDeserialize for VrfCloseParams

source§

impl BorshDeserialize for VrfLiteCloseParams

source§

impl BorshDeserialize for VrfLiteRequestRandomnessParams

source§

impl BorshDeserialize for VrfPoolRemoveParams

source§

impl BorshDeserialize for VrfPoolRequestRandomnessParams

source§

impl BorshDeserialize for VrfRequestRandomnessParams

source§

impl BorshDeserialize for VrfSetCallbackParams

§

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, E> BorshDeserialize for Result<T, E>

§

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,