pub struct Subscription { /* private fields */ }Implementations§
Source§impl Subscription
impl Subscription
pub fn id(&self) -> u32
pub fn name(&self) -> &str
pub fn read<V>(&self) -> Option<(TimeSpec, V)>where
V: GetParameterTuple,
pub fn read_all<V>(&self) -> Option<(TimeSpec, Vec<V>)>where
V: GetParameterValue + Default,
pub fn notify<F>(&self, cb: F)
Sourcepub fn latest<V>(&self) -> Result<(TimeSpec, V)>where
V: GetParameterTuple,
pub fn latest<V>(&self) -> Result<(TimeSpec, V)>where
V: GetParameterTuple,
Blocking analogue of core::Subscription::latest.
Sourcepub fn iter<V>(&self, capacity: usize) -> StreamIter<V>where
V: GetParameterTuple + Send + 'static,
pub fn iter<V>(&self, capacity: usize) -> StreamIter<V>where
V: GetParameterTuple + Send + 'static,
Blocking iterator over the broadcast ring. Each next()
call blocks on the next item via the shared runtime. The
iterator ends (returns None) when the broadcast channel
closes — i.e. when every Subscription clone is dropped.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Subscription
impl RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl UnsafeUnpin for Subscription
impl UnwindSafe for Subscription
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more