[][src]Struct netidx::publisher::Val

pub struct Val(_);

This represents a published value. Internally it is wrapped in an Arc, so cloning it is free. When all references to a given published value have been dropped it will be unpublished. However you must call flush before references to it will be removed from the resolver server.

Implementations

impl Val[src]

pub fn downgrade(&self) -> ValWeak[src]

pub fn update(&self, v: Value)[src]

Queue an update to the published value, it will not be sent out until you call flush on the publisher, however new subscribers will receive the last value passed to update when they subscribe regardless of flush. Multiple updates can be queued before flush is called, in which case on flush subscribers will receive all the queued values in order. If updates are queued on multiple different published values before flush is called, they will all be sent out as a batch and are guarenteed to arrive in the order update was called.

pub fn writes(&self, tx: Sender<Batch>)[src]

Register tx to receive writes. You can register multiple channels, and you can register the same channel on multiple Val objects. If no channels are registered to receive writes they will be ignored.

pub fn id(&self) -> Id[src]

Get the unique Id of this Val

pub fn path(&self) -> &Path[src]

Get a reference to the Path of this published value.

Trait Implementations

impl Clone for Val[src]

Auto Trait Implementations

impl !RefUnwindSafe for Val

impl Send for Val

impl Sync for Val

impl Unpin for Val

impl !UnwindSafe for Val

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,