pub struct CallMessage {
pub msg_type: &'static str,
pub call_id: String,
pub fn_name: String,
pub fn_type: FnType,
pub args: Value,
pub auth: AuthInfo,
pub request: Option<RequestInfo>,
}Expand description
Invoke a function on the TypeScript side.
Fields§
§msg_type: &'static str§call_id: String§fn_name: String§fn_type: FnType§args: Value§auth: AuthInfo§request: Option<RequestInfo>HTTP request context — present only when the action is invoked via
a custom HTTP route (defineRoute binding). Actions called from
other actions via ctx.runAction or from jobs don’t get this.
Enables Stripe-webhook-style signature verification + access to
raw headers/body the router would otherwise discard.
Implementations§
Source§impl CallMessage
impl CallMessage
pub fn new( call_id: String, fn_name: String, fn_type: FnType, args: Value, auth: AuthInfo, ) -> Self
Sourcepub fn with_request(self, request: RequestInfo) -> Self
pub fn with_request(self, request: RequestInfo) -> Self
Attach HTTP request metadata (used when the call originated from a
defineRoute HTTP binding rather than a programmatic invocation).
Trait Implementations§
Source§impl Clone for CallMessage
impl Clone for CallMessage
Source§fn clone(&self) -> CallMessage
fn clone(&self) -> CallMessage
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 moreSource§impl Debug for CallMessage
impl Debug for CallMessage
Auto Trait Implementations§
impl Freeze for CallMessage
impl RefUnwindSafe for CallMessage
impl Send for CallMessage
impl Sync for CallMessage
impl Unpin for CallMessage
impl UnsafeUnpin for CallMessage
impl UnwindSafe for CallMessage
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