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 StorageAccount
impl BorshDeserialize for StorageAccount
Source§fn deserialize(buf: &mut &[u8]) -> Result<StorageAccount, Error>
fn deserialize(buf: &mut &[u8]) -> Result<StorageAccount, 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 moreSource§impl Discriminator for StorageAccount
impl Discriminator for StorageAccount
const DISCRIMINATOR: [u8; 8]
fn discriminator() -> [u8; 8]
Source§impl ShadowDriveStorageAccount for StorageAccount
impl ShadowDriveStorageAccount for StorageAccount
fn check_immutable(&self) -> bool
fn check_delete_flag(&self) -> bool
fn get_identifier(&self) -> String
fn get_storage(&self) -> u64
fn get_last_fee_epoch(&self) -> u32
fn mark_to_delete(&mut self)
fn update_last_fee_epoch(&mut self)
fn is_owner(&self, owner: Pubkey) -> bool
Auto Trait Implementations§
impl Freeze for StorageAccount
impl RefUnwindSafe for StorageAccount
impl Send for StorageAccount
impl Sync for StorageAccount
impl Unpin for StorageAccount
impl UnwindSafe for StorageAccount
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more