Struct sfm_sdk::SysSigReceiver
source · [−]pub struct SysSigReceiver { /* private fields */ }
Expand description
Listens for the machine shutdown signals via a SysSigListener with a broadcast::Receiver
.
Shutdown is signalled using a broadcast::Receiver
. Only a single value is
ever sent. Once a value has been sent via the broadcast channel, the server
should shutdown.
The Shutdown
struct listens for the signal and tracks that the signal has
been received. Callers may query for whether the shutdown signal has been
received or not.
Implementations
sourceimpl SysSigReceiver
impl SysSigReceiver
sourcepub fn new(shutdown: Arc<AtomicBool>, notify: Receiver<()>) -> SysSigReceiver
pub fn new(shutdown: Arc<AtomicBool>, notify: Receiver<()>) -> SysSigReceiver
Create a new Shutdown
backed by the given broadcast::Receiver
.
sourcepub fn is_shutdown(&self) -> bool
pub fn is_shutdown(&self) -> bool
Returns true
if the shutdown signal has been received.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for SysSigReceiver
impl Send for SysSigReceiver
impl Sync for SysSigReceiver
impl Unpin for SysSigReceiver
impl !UnwindSafe for SysSigReceiver
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more