pub enum Trigger {
Account {
address: Pubkey,
offset: u64,
size: u64,
},
Immediate {
jitter: u64,
},
Timestamp {
unix_ts: i64,
jitter: u64,
},
Interval {
seconds: i64,
skippable: bool,
jitter: u64,
},
Cron {
schedule: String,
skippable: bool,
jitter: u64,
},
Slot {
slot: u64,
},
Epoch {
epoch: u64,
},
}Expand description
The triggering conditions of a thread.
Variants§
Account
Allows a thread to be kicked off whenever the data of an account changes.
Fields
Immediate
Allows a thread to be kicked off as soon as it’s created.
Timestamp
Allows a thread to be kicked off according to a unix timestamp.
Fields
Interval
Allows a thread to be kicked off at regular intervals.
Fields
Cron
Allows a thread to be kicked off according to a one-time or recurring schedule.
Fields
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.
Trait Implementations§
Source§impl BorshDeserialize for Trigger
impl BorshDeserialize for Trigger
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>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§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.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for Trigger
impl BorshSerialize for Trigger
impl StructuralPartialEq for Trigger
Auto Trait Implementations§
impl Freeze for Trigger
impl RefUnwindSafe for Trigger
impl Send for Trigger
impl Sync for Trigger
impl Unpin for Trigger
impl UnsafeUnpin 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