pub struct EchoService;Expand description
A stateless service whose only op, echo, returns its payload verbatim.
Trait Implementations§
Source§impl Clone for EchoService
impl Clone for EchoService
Source§fn clone(&self) -> EchoService
fn clone(&self) -> EchoService
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EchoService
Source§impl DaemonService for EchoService
impl DaemonService for EchoService
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§impl Debug for EchoService
impl Debug for EchoService
Source§impl Default for EchoService
impl Default for EchoService
Source§fn default() -> EchoService
fn default() -> EchoService
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EchoService
impl RefUnwindSafe for EchoService
impl Send for EchoService
impl Sync for EchoService
impl Unpin for EchoService
impl UnsafeUnpin for EchoService
impl UnwindSafe for EchoService
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