Struct quarry_redeemer::Redeemer
source · [−]pub struct Redeemer {
pub iou_mint: Pubkey,
pub redemption_mint: Pubkey,
pub bump: u8,
pub total_tokens_redeemed: u64,
}
Expand description
Redeemer state
Fields
iou_mint: Pubkey
Mint of the IOU token.
redemption_mint: Pubkey
Mint of the token to redeem.
bump: u8
Bump seed.
total_tokens_redeemed: u64
Lifetime number of IOU tokens redeemed for redemption tokens.
Implementations
Trait Implementations
sourceimpl AccountDeserialize for Redeemer
impl AccountDeserialize for Redeemer
sourcefn 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
. Read more
sourcefn 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. Read more
sourceimpl AccountSerialize for Redeemer
impl AccountSerialize for Redeemer
sourceimpl BorshDeserialize for Redeemer where
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
u8: BorshDeserialize,
u64: BorshDeserialize,
impl BorshDeserialize for Redeemer where
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
u8: BorshDeserialize,
u64: 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 Redeemer where
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
u8: BorshSerialize,
u64: BorshSerialize,
impl BorshSerialize for Redeemer where
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
u8: BorshSerialize,
u64: BorshSerialize,
sourceimpl Discriminator for Redeemer
impl Discriminator for Redeemer
fn discriminator() -> [u8; 8]
sourceimpl Ord for Redeemer
impl Ord for Redeemer
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Redeemer> for Redeemer
impl PartialOrd<Redeemer> for Redeemer
sourcefn partial_cmp(&self, other: &Redeemer) -> Option<Ordering>
fn partial_cmp(&self, other: &Redeemer) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Redeemer
impl Eq for Redeemer
impl StructuralEq for Redeemer
impl StructuralPartialEq for Redeemer
Auto Trait Implementations
impl RefUnwindSafe for Redeemer
impl Send for Redeemer
impl Sync for Redeemer
impl Unpin for Redeemer
impl UnwindSafe for Redeemer
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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