pub struct CuStampedData<T, M>where
T: CuMsgPayload,
M: Metadata,{
pub tov: Tov,
pub metadata: M,
/* private fields */
}
Expand description
CuMsg is the envelope holding the msg payload and the metadata between tasks.
Fields§
§tov: Tov
The time of validity of the message. It can be undefined (None), one measure point or a range of measures (TimeRange).
metadata: M
This metadata is the data that is common to all messages.
Implementations§
Source§impl<T, M> CuStampedData<T, M>where
T: CuMsgPayload,
M: Metadata,
impl<T, M> CuStampedData<T, M>where
T: CuMsgPayload,
M: Metadata,
pub fn new(payload: Option<T>) -> Self
pub fn payload(&self) -> Option<&T>
pub fn set_payload(&mut self, payload: T)
pub fn clear_payload(&mut self)
pub fn payload_mut(&mut self) -> &mut Option<T>
Trait Implementations§
Source§impl<'__de, T, M, __Context> BorrowDecode<'__de, __Context> for CuStampedData<T, M>where
T: CuMsgPayload + BorrowDecode<'__de, __Context>,
M: Metadata + BorrowDecode<'__de, __Context>,
impl<'__de, T, M, __Context> BorrowDecode<'__de, __Context> for CuStampedData<T, M>where
T: CuMsgPayload + BorrowDecode<'__de, __Context>,
M: Metadata + BorrowDecode<'__de, __Context>,
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl<T, M> Clone for CuStampedData<T, M>
impl<T, M> Clone for CuStampedData<T, M>
Source§fn clone(&self) -> CuStampedData<T, M>
fn clone(&self) -> CuStampedData<T, M>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T, M> Debug for CuStampedData<T, M>
impl<T, M> Debug for CuStampedData<T, M>
Source§impl<T, M, __Context> Decode<__Context> for CuStampedData<T, M>
impl<T, M, __Context> Decode<__Context> for CuStampedData<T, M>
Source§impl<T, M> Default for CuStampedData<T, M>
impl<T, M> Default for CuStampedData<T, M>
Source§fn default() -> CuStampedData<T, M>
fn default() -> CuStampedData<T, M>
Returns the “default value” for a type. Read more
Source§impl<T, M> Encode for CuStampedData<T, M>
impl<T, M> Encode for CuStampedData<T, M>
Source§impl<T, M> ErasedCuStampedData for CuStampedData<T, M>where
T: CuMsgPayload,
M: CuMsgMetadataTrait + Metadata,
impl<T, M> ErasedCuStampedData for CuStampedData<T, M>where
T: CuMsgPayload,
M: CuMsgMetadataTrait + Metadata,
Source§impl<T, M> Serialize for CuStampedData<T, M>
impl<T, M> Serialize for CuStampedData<T, M>
impl<'cl, T: CuMsgPayload, M: Metadata> CuMsgPack<'cl> for &'cl CuStampedData<T, M>
impl<'cl, T: CuMsgPayload, M: Metadata> CuMsgPack<'cl> for &'cl mut CuStampedData<T, M>
Auto Trait Implementations§
impl<T, M> Freeze for CuStampedData<T, M>
impl<T, M> RefUnwindSafe for CuStampedData<T, M>where
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, M> Send for CuStampedData<T, M>
impl<T, M> Sync for CuStampedData<T, M>
impl<T, M> Unpin for CuStampedData<T, M>
impl<T, M> UnwindSafe for CuStampedData<T, M>where
M: UnwindSafe,
T: UnwindSafe,
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