pub struct QueueFn {
pub name: &'static str,
pub sig_hash: u64,
pub trampoline: fn(ctx: &Context, args: &[u8]) -> Result<Value>,
}Expand description
Host-side registry entry for a #[queue_fn] discovered across loaded
wasm apps. The worker dispatches by looking up (app_id, name) in the
HashMap<(AppId, String), QueueFn> that the runtime maintains.
The trampoline is the per-function shim the attribute macro emits: it deserializes the msgpack args tuple and calls the user function.
Fields§
§name: &'static strCanonical name (matches the user function identifier).
sig_hash: u64Signature hash — xxh3_64 of the canonicalized signature string.
trampoline: fn(ctx: &Context, args: &[u8]) -> Result<Value>Trampoline: takes &Context + serialized args, returns the user
function’s JSON result (or an error).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueueFn
impl RefUnwindSafe for QueueFn
impl Send for QueueFn
impl Sync for QueueFn
impl Unpin for QueueFn
impl UnsafeUnpin for QueueFn
impl UnwindSafe for QueueFn
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