pub struct ClientRootService<A: RemoteSpawn> { /* private fields */ }Expand description
A statically declared, root-owned service: a fixed service name plus a
registered actor type A. Callers supply A::Params; there is no
caller-supplied runtime actor type or untyped address.
Implementations§
Source§impl<A: RemoteSpawn> ClientRootService<A>
impl<A: RemoteSpawn> ClientRootService<A>
Sourcepub const fn declare(name: &'static str) -> Self
pub const fn declare(name: &'static str) -> Self
Declare a statically named root-owned service.
This constructs only the local typed descriptor. Self::ensure is
the operation that asks the root ProcAgent to create or reuse the actor.
Sourcepub async fn ensure(
&self,
cx: &impl Actor,
client_root: &ClientRootRef,
params: A::Params,
) -> Result<ActorRef<A>>
pub async fn ensure( &self, cx: &impl Actor, client_root: &ClientRootRef, params: A::Params, ) -> Result<ActorRef<A>>
Ensure this service exists under client_root, returning a typed
reference to it. Concurrent identical ensures collapse on the serial root
ProcAgent; a different actor type or parameter bytes for the same name
returns ClientRootError::ConflictingSpec.
Auto Trait Implementations§
impl<A> Freeze for ClientRootService<A>
impl<A> RefUnwindSafe for ClientRootService<A>
impl<A> Send for ClientRootService<A>
impl<A> Sync for ClientRootService<A>
impl<A> Unpin for ClientRootService<A>
impl<A> UnsafeUnpin for ClientRootService<A>
impl<A> UnwindSafe for ClientRootService<A>
Blanket Implementations§
impl<T> Allocation for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].