pub struct ReadOnlyLoanedMessage<'a, T>where
T: Message,{ /* private fields */ }
Expand description
A message that is owned by the middleware, loaned out for reading.
It dereferences to a &T::RmwMsg
. That is, if T
is already an RMW-native
message, it’s the same as &T
, and otherwise it’s the corresponding RMW-native
message.
This type is returned by Subscription::take_loaned()
and may be used in
subscription callbacks.
The loan is returned by dropping the ReadOnlyLoanedMessage
.
Trait Implementations§
Source§impl<T> Deref for ReadOnlyLoanedMessage<'_, T>where
T: Message,
impl<T> Deref for ReadOnlyLoanedMessage<'_, T>where
T: Message,
Source§impl<T> Drop for ReadOnlyLoanedMessage<'_, T>where
T: Message,
impl<T> Drop for ReadOnlyLoanedMessage<'_, T>where
T: Message,
impl<T> Send for ReadOnlyLoanedMessage<'_, T>where
T: Message,
impl<T> Sync for ReadOnlyLoanedMessage<'_, T>where
T: Message,
Auto Trait Implementations§
impl<'a, T> Freeze for ReadOnlyLoanedMessage<'a, T>
impl<'a, T> RefUnwindSafe for ReadOnlyLoanedMessage<'a, T>where
<T as Message>::RmwMsg: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> Unpin for ReadOnlyLoanedMessage<'a, T>
impl<'a, T> UnwindSafe for ReadOnlyLoanedMessage<'a, T>where
<T as Message>::RmwMsg: RefUnwindSafe,
T: RefUnwindSafe,
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