[−][src]Struct netidx::subscriber::Val
A non durable subscription to a value. If all user held references
to Val
are dropped then it will be unsubscribed.
Implementations
impl Val
[src]
pub fn downgrade(&self) -> ValWeak
[src]
pub async fn last<'_>(&'_ self) -> Option<Value>
[src]
Get the last published value, or None if the subscription is
dead. Will only return None
if the subscription is dead,
otherwise there WILL be a value.
pub fn updates(&self, begin_with_last: bool, tx: Sender<Batch>)
[src]
Register tx
to receive updates to this Val
. If
begin_with_last
is true, then an immediate update will be
sent consisting of the last value received from the publisher.
You may register multiple different channels to receive
updates from a Val
, and you may register one channel to
receive updates from multiple Val
s.
pub fn write(&self, v: Value)
[src]
Write a value back to the publisher. This will start going out
as soon as this method returns, and you can call flush
on
the subscriber to get pushback in case of a slow publisher.
The publisher will receive multiple writes in the order you
call write
.
pub fn id(&self) -> SubId
[src]
Get the unique id of this subscription.
Trait Implementations
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]
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,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,