[][src]Struct abscissa_core::application::cell::Cell

pub struct Cell<T>(_);

Newtype wrapper for the cell type we use.

This allows us to define methods on the type, which we do below on the AppCell alias (trait bounds on const fn types aren't yet stable).

Methods

impl<T> Cell<T>[src]

pub const fn new() -> Cell<T>[src]

Create a new application cell.

impl<A: Application> Cell<Lock<A>>[src]

pub fn read(&'static self) -> Reader<A>[src]

Get the application state, acquiring a shared, read-only lock around it which permits concurrent access by multiple readers.

pub fn write(&'static self) -> Writer<A>[src]

Obtain an exclusive lock on the application state, allowing it to be accessed mutably.

Auto Trait Implementations

impl<T> RefUnwindSafe for Cell<T> where
    T: RefUnwindSafe + UnwindSafe

impl<T> Send for Cell<T> where
    T: Send

impl<T> Sync for Cell<T> where
    T: Send + Sync

impl<T> Unpin for Cell<T> where
    T: Unpin

impl<T> UnwindSafe for Cell<T> where
    T: UnwindSafe

Blanket Implementations

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

impl<T> AsAny for T where
    T: Any
[src]

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

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

impl<T> Erased for T

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.