[−][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>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
R: DeserializeOwned + Send + Sync + 'async_trait,
T: Serialize + Send + Sync + 'async_trait,
NodeContext<'a>: 'async_trait,
[src]
&'life0 self,
service_name: &'life1 str,
request: Request<T>
) -> Pin<Box<dyn Future<Output = Result<Response<R>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
R: DeserializeOwned + Send + Sync + 'async_trait,
T: Serialize + Send + Sync + 'async_trait,
NodeContext<'a>: 'async_trait,
fn notify<'life0, 'life1, 'async_trait, T>(
&'life0 self,
service_name: &'life1 str,
request: Request<T>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: Send + Sync + Serialize + 'async_trait,
NodeContext<'a>: 'async_trait,
[src]
&'life0 self,
service_name: &'life1 str,
request: Request<T>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: Send + Sync + Serialize + 'async_trait,
NodeContext<'a>: '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> Same<T> for T
type Output = T
Should always be Self
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,