pub struct NativeActorHandler {
pub send: Box<dyn Fn(Value) -> Result<Value, String> + Send + Sync>,
}Expand description
Erased Rust-side handler for ActorHandler::Native. Boxed so we
can store any closure that captures (e.g. an mpsc::Sender).
Wrapped in Arc so cloning an ActorCell (which the existing
conc.tell flow does — let handler = guard.handler.clone())
is cheap and the closure isn’t duplicated.
Fields§
§send: Box<dyn Fn(Value) -> Result<Value, String> + Send + Sync>Trait Implementations§
Auto Trait Implementations§
impl Freeze for NativeActorHandler
impl !RefUnwindSafe for NativeActorHandler
impl Send for NativeActorHandler
impl Sync for NativeActorHandler
impl Unpin for NativeActorHandler
impl UnsafeUnpin for NativeActorHandler
impl !UnwindSafe for NativeActorHandler
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