pub struct File {
pub immutable: bool,
pub to_be_deleted: bool,
pub delete_request_epoch: u32,
pub size: u64,
pub sha256_hash: [u8; 32],
pub init_counter_seed: u32,
pub storage_account: Pubkey,
pub name: String,
}Fields§
§immutable: boolMutability
to_be_deleted: boolDelete flag
delete_request_epoch: u32Delete request epoch
size: u64File size (bytes)
sha256_hash: [u8; 32]File hash (sha256)
init_counter_seed: u32File counter seed
storage_account: PubkeyStorage accout
name: StringFile name
Implementations§
Trait Implementations§
Source§impl AccountDeserialize for File
impl AccountDeserialize for File
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 File
impl AccountSerialize for File
Source§impl BorshDeserialize for Filewhere
bool: BorshDeserialize,
u32: BorshDeserialize,
u64: BorshDeserialize,
[u8; 32]: BorshDeserialize,
Pubkey: BorshDeserialize,
String: BorshDeserialize,
impl BorshDeserialize for Filewhere
bool: BorshDeserialize,
u32: BorshDeserialize,
u64: BorshDeserialize,
[u8; 32]: BorshDeserialize,
Pubkey: BorshDeserialize,
String: BorshDeserialize,
Source§impl BorshSerialize for Filewhere
bool: BorshSerialize,
u32: BorshSerialize,
u64: BorshSerialize,
[u8; 32]: BorshSerialize,
Pubkey: BorshSerialize,
String: BorshSerialize,
impl BorshSerialize for Filewhere
bool: BorshSerialize,
u32: BorshSerialize,
u64: BorshSerialize,
[u8; 32]: BorshSerialize,
Pubkey: BorshSerialize,
String: BorshSerialize,
Source§impl Discriminator for File
impl Discriminator for File
const DISCRIMINATOR: [u8; 8]
fn discriminator() -> [u8; 8]
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnsafeUnpin for File
impl UnwindSafe for File
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