pub struct Writer<T> { /* private fields */ }Expand description
Distribute value between all readers
Implementations§
Source§impl<T> Writer<T>
impl<T> Writer<T>
Write val and distribute it between all readers
§Example
let (mut tx, rx) = rw_cell::broadcast::cloneable::new("Not good, but ok");
let mut rx1 = tx.subscribe();
let mut rx2 = rx.clone();
tx.share("Not good");
assert_eq!(rx1.read_with_is_new(), (&"Not good", true));
assert_eq!(rx2.read_with_is_new(), (&"Not good", true));Auto Trait Implementations§
impl<T> Freeze for Writer<T>
impl<T> RefUnwindSafe for Writer<T>where
T: RefUnwindSafe,
impl<T> Send for Writer<T>
impl<T> Sync for Writer<T>
impl<T> Unpin for Writer<T>
impl<T> UnwindSafe for Writer<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more