Struct jet_fixed_term::tickets::state::ClaimTicket
source · [−]pub struct ClaimTicket {
pub owner: Pubkey,
pub market: Pubkey,
pub maturation_timestamp: i64,
pub redeemable: u64,
}
Expand description
A ClaimTicket
represents a claim of tickets that have been staked with the program
This account is generated by the StakeTickets
program instruction
Fields
owner: Pubkey
The account registered as owner of this claim
market: Pubkey
The TicketManager
this claim ticket was established under
Determines the asset this ticket will be redeemed for
maturation_timestamp: i64
The slot after which this claim can be redeemed for the underlying value
redeemable: u64
The number of tokens this claim is redeemable for
Implementations
sourceimpl ClaimTicket
impl ClaimTicket
sourcepub fn verify_owner_manager(&self, owner: &Pubkey, market: &Pubkey) -> Result<()>
pub fn verify_owner_manager(&self, owner: &Pubkey, market: &Pubkey) -> Result<()>
Verify ticket ownership, takes owner and manager pubkeys
sourcepub fn verify_owner(&self, owner: &Pubkey) -> Result<()>
pub fn verify_owner(&self, owner: &Pubkey) -> Result<()>
Verify ticket ownership, takes owner pubkey
Trait Implementations
sourceimpl AccountDeserialize for ClaimTicket
impl AccountDeserialize for ClaimTicket
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 moresourcefn 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 ClaimTicket
impl AccountSerialize for ClaimTicket
sourcefn try_serialize<W: Write>(&self, writer: &mut W) -> Result<()>
fn try_serialize<W: Write>(&self, writer: &mut W) -> Result<()>
Serializes the account data into
writer
.sourceimpl BorshDeserialize for ClaimTicketwhere
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
i64: BorshDeserialize,
u64: BorshDeserialize,
impl BorshDeserialize for ClaimTicketwhere
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
i64: 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 ClaimTicketwhere
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
i64: BorshSerialize,
u64: BorshSerialize,
impl BorshSerialize for ClaimTicketwhere
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
i64: BorshSerialize,
u64: BorshSerialize,
sourceimpl Clone for ClaimTicket
impl Clone for ClaimTicket
sourcefn clone(&self) -> ClaimTicket
fn clone(&self) -> ClaimTicket
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 moresourceimpl Debug for ClaimTicket
impl Debug for ClaimTicket
sourceimpl Discriminator for ClaimTicket
impl Discriminator for ClaimTicket
fn discriminator() -> [u8; 8]
sourceimpl Owner for ClaimTicket
impl Owner for ClaimTicket
Auto Trait Implementations
impl RefUnwindSafe for ClaimTicket
impl Send for ClaimTicket
impl Sync for ClaimTicket
impl Unpin for ClaimTicket
impl UnwindSafe for ClaimTicket
Blanket Implementations
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