pub struct WorkerRegistration { /* private fields */ }Expand description
Registration token owned by the worker stream task.
Dropping the token performs best-effort cleanup for disconnect paths. Call
WorkerRegistration::deregister when the caller needs a typed poison error.
Implementations§
Source§impl WorkerRegistration
impl WorkerRegistration
Sourcepub fn namespaces(&self) -> Option<&BTreeSet<String>>
pub fn namespaces(&self) -> Option<&BTreeSet<String>>
Authorized namespace set for this registration.
Sourcepub fn task_queue(&self) -> Option<&str>
pub fn task_queue(&self) -> Option<&str>
Task queue (pool/flavour) this registration serves within each namespace.
Sourcepub fn activity_types(&self) -> Option<&BTreeSet<String>>
pub fn activity_types(&self) -> Option<&BTreeSet<String>>
Activity types advertised by this registration.
Sourcepub fn deregister(self) -> Result<(), ServerError>
pub fn deregister(self) -> Result<(), ServerError>
Explicitly remove this worker from the registry.
§Errors
Returns ServerError::LockPoisoned if the registry lock is poisoned.
Trait Implementations§
Source§impl Debug for WorkerRegistration
impl Debug for WorkerRegistration
Source§impl Drop for WorkerRegistration
impl Drop for WorkerRegistration
Auto Trait Implementations§
impl !RefUnwindSafe for WorkerRegistration
impl !UnwindSafe for WorkerRegistration
impl Freeze for WorkerRegistration
impl Send for WorkerRegistration
impl Sync for WorkerRegistration
impl Unpin for WorkerRegistration
impl UnsafeUnpin for WorkerRegistration
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request