pub struct Subscription<M> { /* private fields */ }
Expand description
A ROS2 Subscription
Corresponds to a (simplified) DataReader
in
DDS
Implementations§
Source§impl<M> Subscription<M>where
M: 'static,
impl<M> Subscription<M>where
M: 'static,
pub fn take_seed<'de, S>(&self, seed: S) -> ReadResult<Option<(M, MessageInfo)>>where
S: DeserializeSeed<'de, Value = M> + Clone,
M: 'static,
pub fn async_stream_seed<'a, 'de, S>(
&'a self,
seed: S,
) -> impl FusedStream<Item = ReadResult<(M, MessageInfo)>> + 'awhere
S: DeserializeSeed<'de, Value = M> + Clone + 'a,
M: 'static,
Source§impl<M: 'static + DeserializeOwned> Subscription<M>
impl<M: 'static + DeserializeOwned> Subscription<M>
pub fn take(&self) -> ReadResult<Option<(M, MessageInfo)>>
pub async fn async_take(&self) -> ReadResult<(M, MessageInfo)>
pub fn async_stream( &self, ) -> impl FusedStream<Item = ReadResult<(M, MessageInfo)>> + '_
Source§impl<M> Subscription<M>where
M: 'static,
impl<M> Subscription<M>where
M: 'static,
Trait Implementations§
Auto Trait Implementations§
impl<M> !Freeze for Subscription<M>
impl<M> !RefUnwindSafe for Subscription<M>
impl<M> Send for Subscription<M>where
M: Send,
impl<M> Sync for Subscription<M>where
M: Sync,
impl<M> Unpin for Subscription<M>where
M: Unpin,
impl<M> !UnwindSafe for Subscription<M>
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