Struct crs_bind::rtos::Broadcast [−][src]
Represents a source of data which notifies listeners on a new value.
Implementations
impl<T: Clone> Broadcast<T>[src]
pub fn new(data: T) -> Self[src]
Creates a new broadcast event with the associated initial value. Panics
on failure; see Broadcast::try_new().
pub fn try_new(data: T) -> Result<Self, Error>[src]
Creates a new broadcast event with the associated initial value.
pub fn value(&self) -> T[src]
Gets a copy of the current value of the broadcast event.
pub fn listen(&self) -> BroadcastListener<'_, T>[src]
Creates a new listener for the broadcast event.
pub fn publish(&self, data: T)[src]
Publishes a new value for the broadcast event.
Auto Trait Implementations
impl<T> Send for Broadcast<T> where
T: Send + Sync,
T: Send + Sync,
impl<T> Sync for Broadcast<T> where
T: Send + Sync,
T: Send + Sync,
impl<T> Unpin for Broadcast<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,