pub struct BigBrainActor {
pub pos_val: i32,
pub neg_val: i32,
}
Expand description
Big brain actor receives positive and negative streams of numbers
The negative drives the positive stream and the postive after reaching 10 issues a stop command. The actor should ideally behave like this
-1 -> get request 1 -2 -> get request 2 -3 -> skip request 7 -> skip command -8 -> get request 8 -> stop command
Fields§
§pos_val: i32
§neg_val: i32
Implementations§
Source§impl BigBrainActor
impl BigBrainActor
pub const fn new() -> Self
pub fn register_message_handlers()
Trait Implementations§
Source§impl Actor for BigBrainActor
impl Actor for BigBrainActor
§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)where
Self: Sized,
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)where
Self: Sized,
Auto Trait Implementations§
impl Freeze for BigBrainActor
impl RefUnwindSafe for BigBrainActor
impl Send for BigBrainActor
impl Sync for BigBrainActor
impl Unpin for BigBrainActor
impl UnwindSafe for BigBrainActor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more