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
Allows a thread to be kicked off whenever the data of an account changes.
Fields
Cron
Allows a thread to be kicked off according to a one-time or recurring schedule.
Fields
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
Allows a thread to be kicked off according to a Pyth price feed movement.
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 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,
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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