pub enum ActorOperation {
CallFunctionPack {
name: String,
params: Vec<u8>,
response_tx: Sender<Result<Vec<u8>, ActorError>>,
},
HandleWasiHttpRequest {
method: String,
scheme: Option<String>,
authority: Option<String>,
path_with_query: Option<String>,
headers: Vec<(String, Vec<u8>)>,
body: Vec<u8>,
response_tx: Sender<Result<WasiHttpResponse, ActorError>>,
},
}Expand description
§ActorOperation
Represents the different types of operations that can be performed on an actor.
This enum defines the message types that can be sent to an ActorRuntime via
its operation channel. Each variant includes the necessary data for the operation
and a oneshot channel sender for returning the result.
Variants§
CallFunctionPack
Call a WebAssembly function using Pack-native Value encoding.
Params and result are Pack ABI encoded bytes (encode_value/decode_value). Preserves structured type information through the call boundary.
Fields
HandleWasiHttpRequest
Handle a WASI HTTP incoming request This operation creates resources in the actor’s store and calls the exported wasi:http/incoming-handler.handle function
Fields
Authority (host:port)
§
response_tx: Sender<Result<WasiHttpResponse, ActorError>>Channel to send the response back
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ActorOperation
impl !RefUnwindSafe for ActorOperation
impl Send for ActorOperation
impl Sync for ActorOperation
impl Unpin for ActorOperation
impl UnsafeUnpin for ActorOperation
impl !UnwindSafe for ActorOperation
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more