pub enum TriggerKind {
Route {
host: Option<String>,
path: String,
methods: Vec<String>,
},
Invoke {
name: String,
},
Queue {
topic: String,
group: String,
start: StartPosition,
},
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. An empty group is the default
work-queue; a non-empty group is a durable fan-out subscriber (every
message, its own cursor) starting at start on first subscription.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
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,
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
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
key and return true if they are equal.