Trait cycler::WriteAccess[][src]

pub trait WriteAccess {
    type Write;
    fn write_data(&self) -> &Self::Write;
fn write_data_mut(&mut self) -> &mut Self::Write; }

This trait should be implemented for any type that can be written to by a cycler. This specifically allows for the separation of read and write data from the cycler readers and writers. If this functionality is not needed then WriteAccess::Write can be set to Self for no runtime cost.

Associated Types

type Write[src]

The type of write data that can be accessed. Will default to Self when https://github.com/rust-lang/rust/issues/29661 is resolved.

Loading content...

Required methods

fn write_data(&self) -> &Self::Write[src]

Gets shared access to the write data contained

fn write_data_mut(&mut self) -> &mut Self::Write[src]

Gets exclusive access to the write data contained

Loading content...

Implementors

impl<T> WriteAccess for AtomicCyclerWriter<T> where
    T: WriteAccess
[src]

type Write = T::Write

fn write_data(&self) -> &Self::Write[src]

Gets a shared reference to the write data of the current block

fn write_data_mut(&mut self) -> &mut Self::Write[src]

Gets an exclusive reference to the write data of the current block

impl<T> WriteAccess for RwLockCyclerWriter<T> where
    T: WriteAccess
[src]

type Write = T::Write

fn write_data(&self) -> &Self::Write[src]

Gets a shared reference to the write data of the current block

fn write_data_mut(&mut self) -> &mut Self::Write[src]

Gets an exclusive reference to the write data of the current block

Loading content...