pub enum TriggerKind {
Route {
host: Option<String>,
path: String,
methods: Vec<String>,
},
Invoke {
name: String,
},
Queue {
topic: String,
},
Cron {
schedule: String,
overlap: Overlap,
},
Blob {
prefix: String,
},
Webhook {
path: String,
secret_env: String,
},
Stream {
topics: Vec<String>,
websocket: bool,
publish_topic: Option<String>,
},
}Expand description
The event that fires a trigger. The role words (route/queue/cron/stream) are the familiar site-view names; each is just a way to reach a function.
Variants§
Route
An HTTP route — the “handler” shape. host scopes it to a virtualhost.
Invoke
A stable invoke name — /api/functions/<name> (the FaaS verb, FA-3).
Queue
A message topic — the “consumer” shape.
Cron
A cron schedule — the “cron” shape.
Blob
An object-storage change under a prefix (FA-5).
Webhook
A signed inbound webhook (FA-5). secret_env names the host env var
holding the verifying secret (never the secret itself).
Stream
Host-native SSE / WebSocket topic fan-out — the “stream” shape (no component,
so a stream trigger’s target is None).
Trait Implementations§
Source§impl Clone for TriggerKind
impl Clone for TriggerKind
Source§fn clone(&self) -> TriggerKind
fn clone(&self) -> TriggerKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TriggerKind
impl Debug for TriggerKind
Source§impl<'de> Deserialize<'de> for TriggerKind
impl<'de> Deserialize<'de> for TriggerKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TriggerKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TriggerKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TriggerKind
Source§impl PartialEq for TriggerKind
impl PartialEq for TriggerKind
Source§impl Serialize for TriggerKind
impl Serialize for TriggerKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TriggerKind
Auto Trait Implementations§
impl Freeze for TriggerKind
impl RefUnwindSafe for TriggerKind
impl Send for TriggerKind
impl Sync for TriggerKind
impl Unpin for TriggerKind
impl UnsafeUnpin for TriggerKind
impl UnwindSafe for TriggerKind
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.