Struct shadow_drive_sdk::StorageAccount
source · pub struct StorageAccount {Show 18 fields
pub is_static: bool,
pub init_counter: u32,
pub del_counter: u32,
pub immutable: bool,
pub to_be_deleted: bool,
pub delete_request_epoch: u32,
pub storage: u64,
pub storage_available: u64,
pub owner_1: Pubkey,
pub owner_2: Pubkey,
pub shdw_payer: Pubkey,
pub account_counter_seed: u32,
pub total_cost_of_current_storage: u64,
pub total_fees_paid: u64,
pub creation_time: u32,
pub creation_epoch: u32,
pub last_fee_epoch: u32,
pub identifier: String,
}Fields§
§is_static: boolImmutable boolean to track what kind of storage account this is. NOTE: Not used in current implementation w/ non-dynamic storage payments
init_counter: u32Flag on whether storage account is public (usable by anyone) Counter tracking how many files have been initialized
del_counter: u32Counter tracking how many files have been deleted
immutable: boolBoolean to track whether storage account (and all child File accounts) are immutable
to_be_deleted: boolDelete flag
delete_request_epoch: u32Delete request epoch
storage: u64Number of bytes of storage associated with this account
storage_available: u64Bytes available for use
owner_1: PubkeyPrimary owner of StorageAccount (immutable)
owner_2: PubkeyOptional owner 2
shdw_payer: PubkeyPubkey of the token account that staked SHDW
account_counter_seed: u32Counter at time of initialization
total_cost_of_current_storage: u64Total shades paid for current box size
total_fees_paid: u64§creation_time: u32Time of storage account creation
creation_epoch: u32Time of storage account creation
last_fee_epoch: u32The last epoch through which the user paid
identifier: StringSome unique identifier that the user provides. Serves as a seed for storage account PDA.
Trait Implementations§
source§impl AccountDeserialize for StorageAccount
impl AccountDeserialize for StorageAccount
source§fn try_deserialize(buf: &mut &[u8]) -> Result<StorageAccount, Error>
fn try_deserialize(buf: &mut &[u8]) -> Result<StorageAccount, Error>
Mint account into a token
Account.source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<StorageAccount, Error>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<StorageAccount, Error>
source§impl AccountSerialize for StorageAccount
impl AccountSerialize for StorageAccount
source§impl BorshDeserialize for StorageAccountwhere
bool: BorshDeserialize,
u32: BorshDeserialize,
u64: BorshDeserialize,
Pubkey: BorshDeserialize,
String: BorshDeserialize,
impl BorshDeserialize for StorageAccountwhere
bool: BorshDeserialize,
u32: BorshDeserialize,
u64: BorshDeserialize,
Pubkey: BorshDeserialize,
String: BorshDeserialize,
source§fn deserialize(buf: &mut &[u8]) -> Result<StorageAccount, Error>
fn deserialize(buf: &mut &[u8]) -> Result<StorageAccount, Error>
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
source§impl BorshSerialize for StorageAccountwhere
bool: BorshSerialize,
u32: BorshSerialize,
u64: BorshSerialize,
Pubkey: BorshSerialize,
String: BorshSerialize,
impl BorshSerialize for StorageAccountwhere
bool: BorshSerialize,
u32: BorshSerialize,
u64: BorshSerialize,
Pubkey: BorshSerialize,
String: BorshSerialize,
source§impl Clone for StorageAccount
impl Clone for StorageAccount
source§fn clone(&self) -> StorageAccount
fn clone(&self) -> StorageAccount
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more