pub struct PublicAutomation {
pub discriminator: [u8; 8],
pub version: u16,
pub bump: u8,
pub authority: Address,
pub strategy: AutomationStrategy,
pub selection_mask: u32,
pub reload: bool,
pub per_round_usd_amount: u64,
pub remaining_usd_amount: u64,
pub total_spent_usd_amount: u64,
pub reserved: [u8; 56],
}Fields§
§discriminator: [u8; 8]§version: u16Struct version.
bump: u8PDA bump seed.
The user the automation plays for; also the PublicDeployment.authority
of every deployment it creates.
strategy: AutomationStrategyTile-selection strategy.
selection_mask: u32Static: the mask used every round. Random: the initial mask whose
count_ones() fixes the generated tile count. Discretionary: 0.
reload: boolWhether settled USD winnings reload remaining_usd_amount.
per_round_usd_amount: u64Gross deploy size per round; all fee legs are deducted from it, so it is exactly what the balance parts with, matching manual deploy semantics.
remaining_usd_amount: u64Escrowed funds still available; mirrors the automation’s USD ATA.
total_spent_usd_amount: u64Lifetime gross USD debited by executes. Only executes move it, and each
debits exactly per_round_usd_amount (immutable), so rounds played =
total_spent_usd_amount / per_round_usd_amount without indexing.
Carved out of reserved, so pre-existing accounts read 0.
reserved: [u8; 56]Reserved.
Implementations§
Trait Implementations§
Source§impl BorshDeserialize for PublicAutomation
impl BorshDeserialize for PublicAutomation
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for PublicAutomation
impl BorshSerialize for PublicAutomation
Source§impl Clone for PublicAutomation
impl Clone for PublicAutomation
Source§fn clone(&self) -> PublicAutomation
fn clone(&self) -> PublicAutomation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PublicAutomation
impl Debug for PublicAutomation
impl Eq for PublicAutomation
Source§impl PartialEq for PublicAutomation
impl PartialEq for PublicAutomation
impl StructuralPartialEq for PublicAutomation
Source§impl<'a> TryFrom<&AccountInfo<'a>> for PublicAutomation
impl<'a> TryFrom<&AccountInfo<'a>> for PublicAutomation
Auto Trait Implementations§
impl Freeze for PublicAutomation
impl RefUnwindSafe for PublicAutomation
impl Send for PublicAutomation
impl Sync for PublicAutomation
impl Unpin for PublicAutomation
impl UnsafeUnpin for PublicAutomation
impl UnwindSafe for PublicAutomation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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