pub struct StorageConfig {
pub shades_per_gib: u64,
pub storage_available: u128,
pub token_account: Pubkey,
pub admin_2: Pubkey,
pub uploader: Pubkey,
pub mutable_fee_start_epoch: Option<u32>,
pub shades_per_gib_per_epoch: u64,
pub crank_bps: u16,
pub max_account_size: u64,
pub min_account_size: u64,
}Fields§
§shades_per_gib: u64Storage costs in shades per GiB
storage_available: u128Total storage available (or remaining)
token_account: PubkeyPubkey of SHDW token account that holds storage fees/stake
admin_2: PubkeyOptional Admin 2
uploader: PubkeyUploader key, used to sign off on successful storage + CSAM scan
mutable_fee_start_epoch: Option<u32>Epoch at which mutable_account_fees turned on
shades_per_gib_per_epoch: u64Mutable fee rate
crank_bps: u16Basis points cranker gets from cranking
max_account_size: u64Maximum size of a storage account
min_account_size: u64Minimum size of a storage account
Implementations§
Source§impl StorageConfig
impl StorageConfig
Trait Implementations§
Source§impl AccountDeserialize for StorageConfig
impl AccountDeserialize for StorageConfig
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<StorageConfig, Error>
fn try_deserialize(buf: &mut &[u8]) -> Result<StorageConfig, Error>
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<StorageConfig, Error>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<StorageConfig, Error>
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 StorageConfig
impl AccountSerialize for StorageConfig
Source§impl BorshDeserialize for StorageConfigwhere
u64: BorshDeserialize,
u128: BorshDeserialize,
Pubkey: BorshDeserialize,
Option<u32>: BorshDeserialize,
u16: BorshDeserialize,
impl BorshDeserialize for StorageConfigwhere
u64: BorshDeserialize,
u128: BorshDeserialize,
Pubkey: BorshDeserialize,
Option<u32>: BorshDeserialize,
u16: BorshDeserialize,
Source§fn deserialize(buf: &mut &[u8]) -> Result<StorageConfig, Error>
fn deserialize(buf: &mut &[u8]) -> Result<StorageConfig, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§impl BorshSerialize for StorageConfigwhere
u64: BorshSerialize,
u128: BorshSerialize,
Pubkey: BorshSerialize,
Option<u32>: BorshSerialize,
u16: BorshSerialize,
impl BorshSerialize for StorageConfigwhere
u64: BorshSerialize,
u128: BorshSerialize,
Pubkey: BorshSerialize,
Option<u32>: BorshSerialize,
u16: BorshSerialize,
Source§impl Clone for StorageConfig
impl Clone for StorageConfig
Source§fn clone(&self) -> StorageConfig
fn clone(&self) -> StorageConfig
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 StorageConfig
impl Discriminator for StorageConfig
const DISCRIMINATOR: [u8; 8]
fn discriminator() -> [u8; 8]
Auto Trait Implementations§
impl Freeze for StorageConfig
impl RefUnwindSafe for StorageConfig
impl Send for StorageConfig
impl Sync for StorageConfig
impl Unpin for StorageConfig
impl UnwindSafe for StorageConfig
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
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> 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>
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