Struct px4::uorb::Subscription
source · pub struct Subscription<T> { /* private fields */ }
Expand description
A subscription to a Message
topic.
Create one using
subscribe
or
subscribe_multi
.
Drop
ping the subscription will
unsubscribe from the topic.
Implementations
sourceimpl<T: Message> Subscription<T>
impl<T: Message> Subscription<T>
sourcepub fn copy(&self, val: &mut T) -> Result<(), i32>
pub fn copy(&self, val: &mut T) -> Result<(), i32>
Copy the latest message into the given message object.
It is safe for *val
to be uninitialized when calling this function.
sourcepub fn check(&self) -> Result<bool, i32>
pub fn check(&self) -> Result<bool, i32>
Check if there have been any updates since the last call to get
or copy
.
sourcepub fn stat(&self) -> Result<u64, i32>
pub fn stat(&self) -> Result<u64, i32>
Get the timestamp of the latest message, in microseconds.
sourcepub fn get_priority(&self) -> Result<i32, i32>
pub fn get_priority(&self) -> Result<i32, i32>
Get the priority of the topic.
sourcepub fn set_interval(&self, interval: u32) -> Result<(), i32>
pub fn set_interval(&self, interval: u32) -> Result<(), i32>
Set the minimum time (in milliseconds) between updates as seen by this subscription.
sourcepub fn get_interval(&self) -> Result<u32, i32>
pub fn get_interval(&self) -> Result<u32, i32>
Get the minimum time (in milliseconds) between updates as seen by this subscription.
sourcepub fn raw_handle(&self) -> i32
pub fn raw_handle(&self) -> i32
Get the raw handle.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Subscription<T>
impl<T> !Send for Subscription<T>
impl<T> !Sync for Subscription<T>
impl<T> !Unpin for Subscription<T>
impl<T> !UnwindSafe for Subscription<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more