Struct mpl_candy_guard::state::candy_guard::CandyGuardData
source · [−]Fields
default: GuardSet
groups: Option<Vec<Group>>
Implementations
sourceimpl CandyGuardData
impl CandyGuardData
sourcepub fn save(&self, data: &mut [u8]) -> Result<()>
pub fn save(&self, data: &mut [u8]) -> Result<()>
Serialize the candy guard data into the specified data array.
sourcepub fn load(data: &[u8]) -> Result<Box<Self>>
pub fn load(data: &[u8]) -> Result<Box<Self>>
Deserializes the guards. Only attempts the deserialization of individuals guards if the data slice is large enough.
pub fn active_set(data: &[u8], label: Option<String>) -> Result<Box<GuardSet>>
pub fn size(&self) -> usize
Trait Implementations
sourceimpl BorshDeserialize for CandyGuardDatawhere
GuardSet: BorshDeserialize,
Option<Vec<Group>>: BorshDeserialize,
impl BorshDeserialize for CandyGuardDatawhere
GuardSet: BorshDeserialize,
Option<Vec<Group>>: BorshDeserialize,
sourcefn 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. Read more
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.
sourceimpl BorshSerialize for CandyGuardDatawhere
GuardSet: BorshSerialize,
Option<Vec<Group>>: BorshSerialize,
impl BorshSerialize for CandyGuardDatawhere
GuardSet: BorshSerialize,
Option<Vec<Group>>: BorshSerialize,
sourceimpl Clone for CandyGuardData
impl Clone for CandyGuardData
sourcefn clone(&self) -> CandyGuardData
fn clone(&self) -> CandyGuardData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for CandyGuardData
impl Send for CandyGuardData
impl Sync for CandyGuardData
impl Unpin for CandyGuardData
impl UnwindSafe for CandyGuardData
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more