Enum clockwork_thread_program::objects::Trigger
source · [−]pub enum Trigger {
Account {
address: Pubkey,
offset: usize,
size: usize,
},
Cron {
schedule: String,
skippable: bool,
},
Immediate,
}Expand description
The triggering conditions of a thread.
Variants
Account
Fields
offset: usizeThe byte offset of the account data to monitor.
size: usizeThe size of the byte slice to monitor (must be less than 1kb)
Allows a thread to be kicked off whenever the data of an account changes.
Cron
Fields
schedule: StringThe schedule in cron syntax. Value must be parsable by the clockwork_cron package.
skippable: boolBoolean value indicating whether triggering moments may be skipped if they are missed (e.g. due to network downtime). If false, any “missed” triggering moments will simply be executed as soon as the network comes back online.
Allows a thread to be kicked off according to a one-time or recurring schedule.
Immediate
Allows a thread to be kicked off as soon as it’s created.
Trait Implementations
sourceimpl BorshDeserialize for Triggerwhere
Pubkey: BorshDeserialize,
usize: BorshDeserialize,
usize: BorshDeserialize,
String: BorshDeserialize,
bool: BorshDeserialize,
impl BorshDeserialize for Triggerwhere
Pubkey: BorshDeserialize,
usize: BorshDeserialize,
usize: BorshDeserialize,
String: BorshDeserialize,
bool: BorshDeserialize,
sourcefn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes. Read more
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
sourceimpl BorshSerialize for Triggerwhere
Pubkey: BorshSerialize,
usize: BorshSerialize,
usize: BorshSerialize,
String: BorshSerialize,
bool: BorshSerialize,
impl BorshSerialize for Triggerwhere
Pubkey: BorshSerialize,
usize: BorshSerialize,
usize: BorshSerialize,
String: BorshSerialize,
bool: BorshSerialize,
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
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more