[−][src]Struct potatonet_node::NodeContext
节点上下文
Methods
impl<'a> NodeContext<'a>[src]
pub fn from(&self) -> Option<ServiceId>[src]
请求或者通知来源服务id
pub fn service_name(&self) -> &str[src]
当前服务名称
pub fn service_id(&self) -> ServiceId[src]
当前服务id
pub fn shutdown_node(&self)[src]
停止节点运行
Trait Implementations
impl<'a> Context for NodeContext<'a>[src]
fn call<'life0, 'life1, 'async_trait, T, R>(
&'life0 self,
service_name: &'life1 str,
request: Request<T>
) -> Pin<Box<dyn Future<Output = Result<Response<R>>> + Send + 'async_trait>> where
T: Serialize + Send + Sync,
R: DeserializeOwned + Send + Sync,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
service_name: &'life1 str,
request: Request<T>
) -> Pin<Box<dyn Future<Output = Result<Response<R>>> + Send + 'async_trait>> where
T: Serialize + Send + Sync,
R: DeserializeOwned + Send + Sync,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn notify<'life0, 'life1, 'async_trait, T: Serialize + Send + Sync>(
&'life0 self,
service_name: &'life1 str,
request: Request<T>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
service_name: &'life1 str,
request: Request<T>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl<'a> !RefUnwindSafe for NodeContext<'a>
impl<'a> Send for NodeContext<'a>
impl<'a> Sync for NodeContext<'a>
impl<'a> Unpin for NodeContext<'a>
impl<'a> !UnwindSafe for NodeContext<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,