pub struct PickerActor { /* private fields */ }Expand description
The per-plugin actor: owns the Store + picker bindings for the plugin’s
whole life and serves calls off the channel until every PickerClient is
dropped. Construct via PluginHost::spawn_picker_source; drive by spawning
run on a multi-thread runtime.
Implementations§
Source§impl PickerActor
impl PickerActor
Sourcepub fn id(&self) -> PluginId
pub fn id(&self) -> PluginId
The host-issued identity of this plugin (matches its PickerClient::id).
Sourcepub fn with_tracer(self, tracer: Option<PluginTracerHandle>) -> Self
pub fn with_tracer(self, tracer: Option<PluginTracerHandle>) -> Self
PO.2: attach the boundary tracer (the loader calls this before spawning run()). Off the hot path — the seam is async.
Sourcepub async fn run(self)
pub async fn run(self)
Drive the actor to completion. Serves each [PickerCall] in arrival
order — arming the per-call fuel/epoch budget, calling the guest export,
mapping a trap to a typed error — and replies on the call’s oneshot.
A trap does not end the loop: the Store survives a clean fuel/epoch
trap, so the source stays callable (full crash-quarantine is PH7.12). The
loop ends when the channel closes (all clients dropped), dropping the
Store — the teardown seam. If a caller has already dropped its reply
receiver, the send is a no-op (the call was abandoned).
Auto Trait Implementations§
impl !RefUnwindSafe for PickerActor
impl !Sync for PickerActor
impl !UnwindSafe for PickerActor
impl Freeze for PickerActor
impl Send for PickerActor
impl Unpin for PickerActor
impl UnsafeUnpin for PickerActor
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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