Struct communication::actor::CommunicationActor [−][src]
pub struct CommunicationActor<Req, Res, ClientMsg, P> where
Req: MessageEvent + ToPermissionVariants<P> + Into<ClientMsg>,
Res: MessageEvent,
ClientMsg: Message,
P: Message + VariantPermission, { /* fields omitted */ }
Actor responsible for creating a [P2PNetworkBehaviour
] and handling all interaction with the Swarm.
For each received CommunicationRequest
, a CommunicationResults
is returned to the sender.
Trait Implementations
impl<Req, Res, ClientMsg, P> Actor for CommunicationActor<Req, Res, ClientMsg, P> where
Req: MessageEvent + ToPermissionVariants<P> + Into<ClientMsg>,
Res: MessageEvent,
ClientMsg: Message,
P: Message + VariantPermission,
[src]
Req: MessageEvent + ToPermissionVariants<P> + Into<ClientMsg>,
Res: MessageEvent,
ClientMsg: Message,
P: Message + VariantPermission,
type Msg = CommunicationRequest<Req, ClientMsg>
fn post_start(&mut self, ctx: &Context<Self::Msg>)
[src]
fn post_stop(&mut self)
[src]
fn recv(&mut self, ctx: &Context<Self::Msg>, msg: Self::Msg, sender: Sender)
[src]
pub fn pre_start(&mut self, ctx: &Context<Self::Msg>)
[src]
pub fn supervisor_strategy(&self) -> Strategy
[src]
pub fn sys_recv(
&mut self,
ctx: &Context<Self::Msg>,
msg: SystemMsg,
sender: Option<BasicActorRef>
)
[src]
&mut self,
ctx: &Context<Self::Msg>,
msg: SystemMsg,
sender: Option<BasicActorRef>
)
impl<Req, Res, ClientMsg, P> ActorFactoryArgs<(Keypair, CommunicationActorConfig<ClientMsg>, BehaviourConfig)> for CommunicationActor<Req, Res, ClientMsg, P> where
Req: MessageEvent + ToPermissionVariants<P> + Into<ClientMsg>,
Res: MessageEvent,
ClientMsg: Message,
P: Message + VariantPermission,
[src]
Req: MessageEvent + ToPermissionVariants<P> + Into<ClientMsg>,
Res: MessageEvent,
ClientMsg: Message,
P: Message + VariantPermission,
fn create_args(
config: (Keypair, CommunicationActorConfig<ClientMsg>, BehaviourConfig)
) -> Self
[src]
config: (Keypair, CommunicationActorConfig<ClientMsg>, BehaviourConfig)
) -> Self
Auto Trait Implementations
impl<Req, Res, ClientMsg, P> !RefUnwindSafe for CommunicationActor<Req, Res, ClientMsg, P>
impl<Req, Res, ClientMsg, P> Send for CommunicationActor<Req, Res, ClientMsg, P>
impl<Req, Res, ClientMsg, P> Sync for CommunicationActor<Req, Res, ClientMsg, P> where
P: Sync,
P: Sync,
impl<Req, Res, ClientMsg, P> Unpin for CommunicationActor<Req, Res, ClientMsg, P> where
P: Unpin,
Res: Unpin,
P: Unpin,
Res: Unpin,
impl<Req, Res, ClientMsg, P> !UnwindSafe for CommunicationActor<Req, Res, ClientMsg, P>
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,
pub 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.
pub 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.
pub 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>,