pub struct BridgeService { /* private fields */ }Expand description
Hosts a BridgeServer under the daemon, persisting its session token for
thin-client discovery and allowing in-place restart.
Implementations§
Source§impl BridgeService
impl BridgeService
Trait Implementations§
Source§impl DaemonService for BridgeService
impl DaemonService for BridgeService
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Stable identifier used to route control-socket envelopes to this service
(the envelope’s
service field) and to label its status/menu.Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
op: &'life1 str,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
op: &'life1 str,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handles an operation routed to this service, returning a JSON payload.
Cheap snapshot of the service’s tray submenu, polled by the menu-bar
shell. Must not block.
Performs a tray menu action previously surfaced by
menu,
identified by its MenuAction::id.Source§fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServiceStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServiceStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Structured status for
daemon status aggregation.Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gracefully stops the service, draining in-flight work. Called once on
daemon shutdown.
Source§fn subscribe(
&self,
_op: &str,
_payload: &Value,
) -> Option<Box<dyn ServiceStream>>
fn subscribe( &self, _op: &str, _payload: &Value, ) -> Option<Box<dyn ServiceStream>>
Opens a push subscription for a streaming op, or returns
None when
op is not one this service streams (the default for every service). Read moreSource§fn credit_accept_outage(&self, _outage: Duration)
fn credit_accept_outage(&self, _outage: Duration)
Told that the control socket could not accept connections for
outage
(descriptor exhaustion, #2111), so no client could have reached this
service for that long. Read moreAuto Trait Implementations§
impl !Freeze for BridgeService
impl RefUnwindSafe for BridgeService
impl Send for BridgeService
impl Sync for BridgeService
impl Unpin for BridgeService
impl UnsafeUnpin for BridgeService
impl UnwindSafe for BridgeService
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> 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> 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