Struct squads_multisig_program::SmallVec
source · pub struct SmallVec<L, T>(/* private fields */);Expand description
Concise serialization schema for vectors where the length can be represented
by any type L (typically unsigned integer like u8 or u16)
that implements AnchorDeserialize and can be converted to u32.
Implementations§
Trait Implementations§
source§impl<L, T> BorshDeserialize for SmallVec<L, T>where
L: AnchorDeserialize + Into<u32>,
T: AnchorDeserialize,
impl<L, T> BorshDeserialize for SmallVec<L, T>where L: AnchorDeserialize + Into<u32>, T: AnchorDeserialize,
source§fn deserialize(input: &mut &[u8]) -> Result<Self>
fn deserialize(input: &mut &[u8]) -> Result<Self>
This implementation almost exactly matches standard implementation of
Vec<T>::deserialize except that it uses L instead of u32 for the length,
and doesn’t include unsafe code.
§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.
Auto Trait Implementations§
impl<L, T> RefUnwindSafe for SmallVec<L, T>where L: RefUnwindSafe, T: RefUnwindSafe,
impl<L, T> Send for SmallVec<L, T>where L: Send, T: Send,
impl<L, T> Sync for SmallVec<L, T>where L: Sync, T: Sync,
impl<L, T> Unpin for SmallVec<L, T>where L: Unpin, T: Unpin,
impl<L, T> UnwindSafe for SmallVec<L, T>where L: UnwindSafe, 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