[][src]Trait drone_core::reg::RwRegUnsync

pub trait RwRegUnsync<'a>: RReg<Urt> + WRegUnsync<'a> + RegRef<'a, Urt> {
    fn modify<F>(&'a mut self, f: F)
    where
        F: for<'b> FnOnce(&'b mut Self::Hold) -> &'b mut Self::Hold
; }

Non-atomic operations for read-write register.

Required methods

fn modify<F>(&'a mut self, f: F) where
    F: for<'b> FnOnce(&'b mut Self::Hold) -> &'b mut Self::Hold

Reads the value from the register memory, then passes the value to the closure f, then writes the result of the closure back to the register memory.

This operation is non-atomic, thus it requires a mutable reference to the token.

Loading content...

Implementors

impl<'a, R> RwRegUnsync<'a> for R where
    R: RReg<Urt> + WRegUnsync<'a> + RegRef<'a, Urt>, 
[src]

Loading content...