pub struct ActionStats {
pub initialized: bool,
pub bump: u8,
pub action_kind: u8,
pub owner: Pubkey,
pub total_created: u64,
pub update_count: u64,
pub total_executed: u64,
pub total_closed: u64,
pub last_created_at: i64,
pub last_updated_at: i64,
pub last_executed_at: i64,
pub last_closed_at: i64,
}Expand description
Account that tracks lifecycle statistics of actions known to the program.
Fields§
§initialized: boolWhether the account has been initialized.
bump: u8Bump seed used to derive the PDA for this account.
action_kind: u8The action kind.
owner: PubkeyThe owner.
total_created: u64Total number of actions that have ever been created.
update_count: u64Updated times.
total_executed: u64Total number of actions that have been executed.
total_closed: u64Total number of actions that have been closed.
last_created_at: i64Timestamp of the last created action.
last_updated_at: i64Timestamp of the last created action.
last_executed_at: i64Timestamp of the last executed action.
last_closed_at: i64Timestamp of the last closed action.
Trait Implementations§
Source§impl AccountDeserialize for ActionStats
impl AccountDeserialize for ActionStats
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 AccountSerialize for ActionStats
impl AccountSerialize for ActionStats
Source§impl BorshDeserialize for ActionStatswhere
bool: BorshDeserialize,
u8: BorshDeserialize,
Pubkey: BorshDeserialize,
u64: BorshDeserialize,
i64: BorshDeserialize,
impl BorshDeserialize for ActionStatswhere
bool: BorshDeserialize,
u8: BorshDeserialize,
Pubkey: BorshDeserialize,
u64: BorshDeserialize,
i64: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
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 BorshSerialize for ActionStatswhere
bool: BorshSerialize,
u8: BorshSerialize,
Pubkey: BorshSerialize,
u64: BorshSerialize,
i64: BorshSerialize,
impl BorshSerialize for ActionStatswhere
bool: BorshSerialize,
u8: BorshSerialize,
Pubkey: BorshSerialize,
u64: BorshSerialize,
i64: BorshSerialize,
Source§impl Clone for ActionStats
impl Clone for ActionStats
Source§fn clone(&self) -> ActionStats
fn clone(&self) -> ActionStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Discriminator for ActionStats
impl Discriminator for ActionStats
Source§const DISCRIMINATOR: &'static [u8]
const DISCRIMINATOR: &'static [u8]
Discriminator slice. Read more
Source§impl Space for ActionStats
impl Space for ActionStats
const INIT_SPACE: usize = 99usize
Auto Trait Implementations§
impl Freeze for ActionStats
impl RefUnwindSafe for ActionStats
impl Send for ActionStats
impl Sync for ActionStats
impl Unpin for ActionStats
impl UnwindSafe for ActionStats
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