Enum clockwork_utils::thread::Trigger
source · pub enum Trigger {
Account {
address: Pubkey,
offset: u64,
size: u64,
},
Cron {
schedule: String,
skippable: bool,
},
Now,
Slot {
slot: u64,
},
Epoch {
epoch: u64,
},
Timestamp {
unix_ts: i64,
},
Pyth {
price_feed: Pubkey,
equality: Equality,
limit: i64,
},
}
Expand description
The triggering conditions of a thread.
Variants§
Account
Fields
§
address: Pubkey
The address of the account to monitor.
Allows a thread to be kicked off whenever the data of an account changes.
Cron
Fields
Allows a thread to be kicked off according to a one-time or recurring schedule.
Now
Allows a thread to be kicked off as soon as it’s created.
Slot
Allows a thread to be kicked off according to a slot.
Epoch
Allows a thread to be kicked off according to an epoch number.
Timestamp
Allows a thread to be kicked off according to a unix timestamp.
Pyth
Fields
§
price_feed: Pubkey
The address of the price feed to monitor.
Allows a thread to be kicked off according to a Pyth price feed movement.
Trait Implementations§
source§impl BorshDeserialize for Triggerwhere
Pubkey: BorshDeserialize,
u64: BorshDeserialize,
String: BorshDeserialize,
bool: BorshDeserialize,
i64: BorshDeserialize,
Equality: BorshDeserialize,
impl BorshDeserialize for Triggerwhere Pubkey: BorshDeserialize, u64: BorshDeserialize, String: BorshDeserialize, bool: BorshDeserialize, i64: BorshDeserialize, Equality: BorshDeserialize,
source§impl BorshSerialize for Triggerwhere
Pubkey: BorshSerialize,
u64: BorshSerialize,
String: BorshSerialize,
bool: BorshSerialize,
i64: BorshSerialize,
Equality: BorshSerialize,
impl BorshSerialize for Triggerwhere Pubkey: BorshSerialize, u64: BorshSerialize, String: BorshSerialize, bool: BorshSerialize, i64: BorshSerialize, Equality: BorshSerialize,
source§impl PartialEq<Trigger> for Trigger
impl PartialEq<Trigger> for Trigger
impl StructuralPartialEq for Trigger
Auto Trait Implementations§
impl RefUnwindSafe for Trigger
impl Send for Trigger
impl Sync for Trigger
impl Unpin for Trigger
impl UnwindSafe for Trigger
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