[−][src]Trait potatonet::node::Service
服务
Associated Types
type Req: Send + Sync + DeserializeOwned + Serialize
请求类型
type Rep: Send + Sync + DeserializeOwned + Serialize
响应类型
type Notify: Send + Sync + DeserializeOwned + Serialize
通知类型
Provided methods
fn start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 NodeContext<'life2>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
&'life0 self,
ctx: &'life1 NodeContext<'life2>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
开始服务
fn stop<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 NodeContext<'life2>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
&'life0 self,
ctx: &'life1 NodeContext<'life2>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
停止服务
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 NodeContext<'life2>,
request: Request<Self::Req>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::Rep>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
&'life0 self,
ctx: &'life1 NodeContext<'life2>,
request: Request<Self::Req>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::Rep>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
功能调用
fn notify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 NodeContext<'life2>,
request: Request<Self::Notify>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
&'life0 self,
ctx: &'life1 NodeContext<'life2>,
request: Request<Self::Notify>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
通知
fn event<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 NodeContext<'life2>,
event: &'life3 Event
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
&'life0 self,
ctx: &'life1 NodeContext<'life2>,
event: &'life3 Event
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
系统事件
Implementors
impl Service for Logger
[src]
type Req = __RequestType_Logger
type Rep = __ResponseTypeLogger
type Notify = __NotifyTypeLogger
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 NodeContext<'life2>,
request: Request<<Logger as Service>::Req>
) -> Pin<Box<dyn Future<Output = Result<Response<<Logger as Service>::Rep>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Logger: 'async_trait,
[src]
&'life0 self,
ctx: &'life1 NodeContext<'life2>,
request: Request<<Logger as Service>::Req>
) -> Pin<Box<dyn Future<Output = Result<Response<<Logger as Service>::Rep>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Logger: 'async_trait,
fn notify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 NodeContext<'life2>,
request: Request<<Logger as Service>::Notify>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Logger: 'async_trait,
[src]
&'life0 self,
ctx: &'life1 NodeContext<'life2>,
request: Request<<Logger as Service>::Notify>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Logger: 'async_trait,