[][src]Struct cntrlr::sync::Flag

pub struct Flag(_);

A true or false flag

This provides AtomicBool-like semantics across all supported MCUs. On MCUs without atomic support, it is implemented as a critical section.

Implementations

impl Flag[src]

pub const fn new(value: bool) -> Self[src]

Create a new Flag

pub fn store(&self, value: bool, ordering: Ordering)[src]

Store a value to the flag.

See core::sync::atomic::AtomicBool::store

impl Flag[src]

pub fn swap(&self, value: bool, ordering: Ordering) -> bool[src]

Stores a value, returning the previous value

See core::sync::atomic::AtomicBool::swap

Trait Implementations

impl Default for Flag[src]

impl Send for Flag[src]

impl Sync for Flag[src]

Auto Trait Implementations

impl Unpin for Flag[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.