Struct Actor1

Source
pub(crate) struct Actor1<ActorSystemT, Actor1RefT, Actor2RefT>
where ActorSystemT: ActorSystemHandle + 'static, Actor1RefT: ActorRef<Ping> + Clone + 'static, Actor2RefT: ActorRef<Actor1ToActor2<Actor1RefT>> + Clone,
{ pub(crate) self_ref: Actor1RefT, pub(crate) node_id: String, pub(crate) actor_system: ActorSystemT, pub(crate) actor2_ref: Actor2RefT, pub(crate) ping_count: u8, pub(crate) spawn_count: u8, }

Fields§

§self_ref: Actor1RefT§node_id: String§actor_system: ActorSystemT§actor2_ref: Actor2RefT§ping_count: u8§spawn_count: u8

Implementations§

Source§

impl<ActorSystemT, Actor1RefT, Actor2RefT> Actor1<ActorSystemT, Actor1RefT, Actor2RefT>
where ActorSystemT: ActorSystemHandle + Debug + Send, Actor1RefT: ActorRef<Ping> + Clone + 'static, Actor2RefT: ActorRef<Actor1ToActor2<Actor1RefT>> + Clone,

Source

pub(crate) fn new( self_ref: Actor1RefT, node_id: impl Into<String>, actor_system: ActorSystemT, actor2_ref: Actor2RefT, ) -> Actor1<ActorSystemT, Actor1RefT, Actor2RefT>

Trait Implementations§

Source§

impl<ActorSystemT, Actor1RefT, Actor2RefT> Debug for Actor1<ActorSystemT, Actor1RefT, Actor2RefT>
where ActorSystemT: ActorSystemHandle + 'static + Debug, Actor1RefT: ActorRef<Ping> + Clone + 'static + Debug, Actor2RefT: ActorRef<Actor1ToActor2<Actor1RefT>> + Clone + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<ActorSystemT, Actor1RefT, Actor2RefT> TypedMsgHandler<Ping> for Actor1<ActorSystemT, Actor1RefT, Actor2RefT>
where ActorSystemT: ActorSystemHandle + Debug + Clone + Send + 'static, Actor1RefT: ActorRef<Ping> + Clone + 'static, Actor2RefT: ActorRef<Actor1ToActor2<Actor1RefT>> + Clone + 'static,

Source§

fn receive(&mut self, _msg: Ping) -> Option<ActorControl>

Auto Trait Implementations§

§

impl<ActorSystemT, Actor1RefT, Actor2RefT> Freeze for Actor1<ActorSystemT, Actor1RefT, Actor2RefT>
where Actor1RefT: Freeze, ActorSystemT: Freeze, Actor2RefT: Freeze,

§

impl<ActorSystemT, Actor1RefT, Actor2RefT> RefUnwindSafe for Actor1<ActorSystemT, Actor1RefT, Actor2RefT>
where Actor1RefT: RefUnwindSafe, ActorSystemT: RefUnwindSafe, Actor2RefT: RefUnwindSafe,

§

impl<ActorSystemT, Actor1RefT, Actor2RefT> Send for Actor1<ActorSystemT, Actor1RefT, Actor2RefT>

§

impl<ActorSystemT, Actor1RefT, Actor2RefT> Sync for Actor1<ActorSystemT, Actor1RefT, Actor2RefT>
where Actor1RefT: Sync, ActorSystemT: Sync, Actor2RefT: Sync,

§

impl<ActorSystemT, Actor1RefT, Actor2RefT> Unpin for Actor1<ActorSystemT, Actor1RefT, Actor2RefT>
where Actor1RefT: Unpin, ActorSystemT: Unpin, Actor2RefT: Unpin,

§

impl<ActorSystemT, Actor1RefT, Actor2RefT> UnwindSafe for Actor1<ActorSystemT, Actor1RefT, Actor2RefT>
where Actor1RefT: UnwindSafe, ActorSystemT: UnwindSafe, Actor2RefT: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.