Struct StatusHandle
pub struct StatusHandle {
inner: Arc<RwLock<Status>>,
event_tx: EventSender,
}Fields§
§inner: Arc<RwLock<Status>>§event_tx: EventSenderImplementations§
§impl StatusHandle
impl StatusHandle
pub fn new(event_tx: EventSender) -> Self
fn with_status<R>(&self, f: impl FnOnce(&Status) -> R) -> R
fn with_status_mut<R>(&self, f: impl FnOnce(&mut Status) -> R) -> R
fn send_event(&self, event: Event)
§impl StatusHandle
impl StatusHandle
pub fn send_service_event(&self, id: String, kind: ServiceEventKind)
pub fn full_status(&self) -> Status
pub fn set_desired_state_met(&self, desired_state_met: bool)
pub fn set_service_count(&self, count: usize)
Trait Implementations§
§impl Clone for StatusHandle
impl Clone for StatusHandle
§fn clone(&self) -> StatusHandle
fn clone(&self) -> StatusHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StatusHandle
impl RefUnwindSafe for StatusHandle
impl Send for StatusHandle
impl Sync for StatusHandle
impl Unpin for StatusHandle
impl UnwindSafe for StatusHandle
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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