Struct netidx::subscriber::Val [−][src]
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 fn last(&self) -> Event
[src]
Get the last event value.
pub fn updates(
&self,
flags: UpdatesFlags,
tx: Sender<Pooled<Vec<(SubId, Event)>>>
)
[src]
&self,
flags: UpdatesFlags,
tx: Sender<Pooled<Vec<(SubId, Event)>>>
)
Register tx
to receive updates to this Val
.
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.
If you register multiple channels pointing to the same receiver you will not get duplicate updates. However, if you register a duplicate channel and begin_with_last is true you will get an update with the current state, even though the channel registration will be ignored.
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
.
The publisher will not reply to your write, except that it may update values you are subscribed to, or trigger some other observable action.
pub fn write_with_recipt(&self, v: Value) -> Receiver<Value>
[src]
This does the same thing as write
except that it requires
the publisher send a reply indicating the outcome of the
request. The reply can be read from the returned oneshot
channel.
Note that compared to write
this function has higher
overhead, avoid it in situations where high message volumes
are required.
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,
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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub 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>,