#[repr(transparent)]pub struct AccountWrapper<T>(pub T);Tuple Fields§
§0: TImplementations§
Source§impl<T> AccountWrapper<T>
impl<T> AccountWrapper<T>
pub fn new(inner: T) -> Self
pub fn into_inner(self) -> T
Trait Implementations§
Source§impl<T> AccountDeserialize for AccountWrapper<T>
impl<T> AccountDeserialize for AccountWrapper<T>
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a
Mint account into a token
Account.Source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
Deserializes account data without checking the account discriminator.
This should only be used on account initialization, when the bytes of
the account are zeroed.
Source§impl<T: AccountSerialize> AccountSerialize for AccountWrapper<T>
impl<T: AccountSerialize> AccountSerialize for AccountWrapper<T>
Source§impl<T: AnchorDeserialize> BorshDeserialize for AccountWrapper<T>
impl<T: AnchorDeserialize> BorshDeserialize for AccountWrapper<T>
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
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.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
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,
Source§impl<T: AnchorSerialize> BorshSerialize for AccountWrapper<T>
impl<T: AnchorSerialize> BorshSerialize for AccountWrapper<T>
Source§impl<T: Clone> Clone for AccountWrapper<T>
impl<T: Clone> Clone for AccountWrapper<T>
Source§fn clone(&self) -> AccountWrapper<T>
fn clone(&self) -> AccountWrapper<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for AccountWrapper<T>
impl<T: Debug> Debug for AccountWrapper<T>
Source§impl<T: Default> Default for AccountWrapper<T>
impl<T: Default> Default for AccountWrapper<T>
Source§fn default() -> AccountWrapper<T>
fn default() -> AccountWrapper<T>
Returns the “default value” for a type. Read more
Source§impl<T> Deref for AccountWrapper<T>
impl<T> Deref for AccountWrapper<T>
Source§impl<T> DerefMut for AccountWrapper<T>
impl<T> DerefMut for AccountWrapper<T>
Source§impl<T: Discriminator> Discriminator for AccountWrapper<T>
impl<T: Discriminator> Discriminator for AccountWrapper<T>
Source§const DISCRIMINATOR: &'static [u8] = T::DISCRIMINATOR
const DISCRIMINATOR: &'static [u8] = T::DISCRIMINATOR
Discriminator slice. Read more
Source§impl<T> From<T> for AccountWrapper<T>
impl<T> From<T> for AccountWrapper<T>
Source§impl<T: PartialEq> PartialEq for AccountWrapper<T>
impl<T: PartialEq> PartialEq for AccountWrapper<T>
Source§fn eq(&self, other: &AccountWrapper<T>) -> bool
fn eq(&self, other: &AccountWrapper<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<T: Eq> Eq for AccountWrapper<T>
impl<T> StructuralPartialEq for AccountWrapper<T>
Auto Trait Implementations§
impl<T> Freeze for AccountWrapper<T>where
T: Freeze,
impl<T> RefUnwindSafe for AccountWrapper<T>where
T: RefUnwindSafe,
impl<T> Send for AccountWrapper<T>where
T: Send,
impl<T> Sync for AccountWrapper<T>where
T: Sync,
impl<T> Unpin for AccountWrapper<T>where
T: Unpin,
impl<T> UnsafeUnpin for AccountWrapper<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for AccountWrapper<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<Container> Signer for Container
impl<Container> Signer for Container
Source§fn pubkey(&self) -> Pubkey
fn pubkey(&self) -> Pubkey
Infallibly gets the implementor’s public key. Returns the all-zeros
Pubkey if the implementor has none.Source§fn try_pubkey(&self) -> Result<Pubkey, SignerError>
fn try_pubkey(&self) -> Result<Pubkey, SignerError>
Fallibly gets the implementor’s public key
Source§fn sign_message(&self, message: &[u8]) -> Signature
fn sign_message(&self, message: &[u8]) -> Signature
Infallibly produces an Ed25519 signature over the provided
message
bytes. Returns the all-zeros Signature if signing is not possible.Source§fn try_sign_message(&self, message: &[u8]) -> Result<Signature, SignerError>
fn try_sign_message(&self, message: &[u8]) -> Result<Signature, SignerError>
Fallibly produces an Ed25519 signature over the provided
message bytes.Source§fn is_interactive(&self) -> bool
fn is_interactive(&self) -> bool
Whether the implementation requires user interaction to sign