pub struct TriggerRequest {
pub function_id: String,
pub payload: Value,
pub action: Option<TriggerAction>,
pub timeout_ms: Option<u64>,
}Expand description
Request object for trigger(). Matches the Node/Python SDK signature:
trigger({ function_id, payload, action?, timeout_ms? })
// Simple call
TriggerRequest {
function_id: "my::function".to_string(),
payload: json!({ "key": "value" }),
action: None,
timeout_ms: None,
};
// With action
TriggerRequest {
function_id: "my::function".to_string(),
payload: json!({}),
action: Some(TriggerAction::Enqueue { queue: "payments".to_string() }),
timeout_ms: None,
};Fields§
§function_id: String§payload: Value§action: Option<TriggerAction>§timeout_ms: Option<u64>Trait Implementations§
Source§impl Clone for TriggerRequest
impl Clone for TriggerRequest
Source§fn clone(&self) -> TriggerRequest
fn clone(&self) -> TriggerRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TriggerRequest
impl RefUnwindSafe for TriggerRequest
impl Send for TriggerRequest
impl Sync for TriggerRequest
impl Unpin for TriggerRequest
impl UnsafeUnpin for TriggerRequest
impl UnwindSafe for TriggerRequest
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