[][src]Struct rt_graph::observable_value::ReadHalf

pub struct ReadHalf<T> where
    T: Clone
{ /* fields omitted */ }

The read half of an ObservableValue, which can only listen for updates and read the current value.

Implementations

impl<T> ReadHalf<T> where
    T: Clone
[src]

pub fn get(&self) -> T[src]

Get the current value

pub fn connect<F>(&mut self, callback: F) -> SubscriptionId where
    F: Fn(&T) + 'static, 
[src]

Connect a new subscriber that will receive callbacks when the value is set.

Returns a SubscriptionId to disconnect the subscription when no longer required.

pub fn disconnect(&mut self, sub_id: SubscriptionId)[src]

Disconnect an existing subscription.

Auto Trait Implementations

impl<T> !RefUnwindSafe for ReadHalf<T>

impl<T> !Send for ReadHalf<T>

impl<T> !Sync for ReadHalf<T>

impl<T> Unpin for ReadHalf<T>

impl<T> !UnwindSafe for ReadHalf<T>

Blanket Implementations

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

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

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

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,