#[repr(u8)]pub enum Signal {
Stop = 0,
Terminate = 1,
}Expand description
A message which is used to stop/terminate an actor.
Handler<Signal> is implemented for all actors automatically.
Variants§
Stop = 0
Stop the actor.
Set the actor’s state to Stopping and trigger
the stopping method of the actor. The actor might be able to resume
by itself.
Terminate = 1
Trait Implementations§
Source§impl Decode for Signal
Available on crate feature ipc only.
impl Decode for Signal
Available on crate feature
ipc only.Source§fn decode(
buf: Bytes,
_ctx: Option<&dyn DecodeContext>,
) -> Result<Self, DecodeError>
fn decode( buf: Bytes, _ctx: Option<&dyn DecodeContext>, ) -> Result<Self, DecodeError>
Decodes the message from the provided buffer.
Source§impl Encode for Signal
Available on crate feature ipc only.
impl Encode for Signal
Available on crate feature
ipc only.Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the number of bytes this message will encode to.
Source§fn encode(
&self,
buf: &mut BytesMut,
_ctx: Option<&dyn EncodeContext>,
) -> Result<(), EncodeError>
fn encode( &self, buf: &mut BytesMut, _ctx: Option<&dyn EncodeContext>, ) -> Result<(), EncodeError>
Encodes the message into the provided buffer. Read more
Source§fn encode_to_bytes(
&self,
ctx: Option<&dyn EncodeContext>,
) -> Result<Bytes, EncodeError>
fn encode_to_bytes( &self, ctx: Option<&dyn EncodeContext>, ) -> Result<Bytes, EncodeError>
Encodes the message into a freshly allocated
Bytes.Source§impl StableId for Signal
Available on crate feature identifier only.
impl StableId for Signal
Available on crate feature
identifier only.const TYPE_ID: StableTypeId
impl Copy for Signal
impl Eq for Signal
impl StructuralPartialEq for Signal
Auto Trait Implementations§
impl Freeze for Signal
impl RefUnwindSafe for Signal
impl Send for Signal
impl Sync for Signal
impl Unpin for Signal
impl UnsafeUnpin for Signal
impl UnwindSafe for Signal
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