pub struct StorageAccountV2 {
pub immutable: bool,
pub to_be_deleted: bool,
pub delete_request_epoch: u32,
pub storage: u64,
pub owner_1: Pubkey,
pub account_counter_seed: u32,
pub creation_time: u32,
pub creation_epoch: u32,
pub last_fee_epoch: u32,
pub identifier: String,
}Fields§
§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
owner_1: PubkeyPrimary owner of StorageAccount (immutable)
account_counter_seed: u32Pubkey of the token account that staked SHDW Counter at time of initialization
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 StorageAccountV2
impl AccountDeserialize for StorageAccountV2
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 StorageAccountV2
impl AccountSerialize for StorageAccountV2
Source§impl BorshDeserialize for StorageAccountV2
impl BorshDeserialize for StorageAccountV2
Source§impl BorshSerialize for StorageAccountV2where
bool: BorshSerialize,
u32: BorshSerialize,
u64: BorshSerialize,
Pubkey: BorshSerialize,
String: BorshSerialize,
impl BorshSerialize for StorageAccountV2where
bool: BorshSerialize,
u32: BorshSerialize,
u64: BorshSerialize,
Pubkey: BorshSerialize,
String: BorshSerialize,
Source§impl Clone for StorageAccountV2
impl Clone for StorageAccountV2
Source§fn clone(&self) -> StorageAccountV2
fn clone(&self) -> StorageAccountV2
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StorageAccountV2
impl Discriminator for StorageAccountV2
const DISCRIMINATOR: [u8; 8]
fn discriminator() -> [u8; 8]
Source§impl ShadowDriveStorageAccount for StorageAccountV2
impl ShadowDriveStorageAccount for StorageAccountV2
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 StorageAccountV2
impl RefUnwindSafe for StorageAccountV2
impl Send for StorageAccountV2
impl Sync for StorageAccountV2
impl Unpin for StorageAccountV2
impl UnsafeUnpin for StorageAccountV2
impl UnwindSafe for StorageAccountV2
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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