pub struct ReadOnlySubscription { /* private fields */ }Implementations§
Source§impl ReadOnlySubscription
impl ReadOnlySubscription
Sourcepub fn new(subscription: Arc<RwLock<Subscription>>) -> Self
pub fn new(subscription: Arc<RwLock<Subscription>>) -> Self
Creates a new readonly wrapper around the Arc<RwLock<Subscription>>.
Sourcepub fn get(&self) -> RwLockReadGuard<'_, Subscription>
pub fn get(&self) -> RwLockReadGuard<'_, Subscription>
Provides thread-safe, readonly access to the subscription.
Sourcepub fn read<V>(&self) -> Option<V>where
V: GetParameterTuple,
pub fn read<V>(&self) -> Option<V>where
V: GetParameterTuple,
Optionally, expose specific readonly fields for convenience
Sourcepub fn read_all<V>(&self) -> Option<(TimeSpec, Vec<V>)>where
V: GetParameterValue + Default,
pub fn read_all<V>(&self) -> Option<(TimeSpec, Vec<V>)>where
V: GetParameterValue + Default,
Reads all subscribed parameters as a flat Vec<V>.
See Subscription::read_all for details.
pub fn notify<F>(&self, cb: F)
pub fn read_with_timestamp<V>(&self) -> Option<(TimeSpec, V)>where
V: GetParameterTuple,
pub fn name(&self) -> String
pub fn id(&self) -> u32
Auto Trait Implementations§
impl Freeze for ReadOnlySubscription
impl RefUnwindSafe for ReadOnlySubscription
impl Send for ReadOnlySubscription
impl Sync for ReadOnlySubscription
impl Unpin for ReadOnlySubscription
impl UnwindSafe for ReadOnlySubscription
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