pub struct CuMsg<T>where
T: CuMsgPayload,{
pub metadata: CuMsgMetadata,
/* private fields */
}
Expand description
CuMsg is the envelope holding the msg payload and the metadata between tasks.
Fields§
§metadata: CuMsgMetadata
This metadata is the data that is common to all messages.
Implementations§
Source§impl<T> CuMsg<T>where
T: CuMsgPayload,
impl<T> CuMsg<T>where
T: CuMsgPayload,
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, __Context> BorrowDecode<'__de, __Context> for CuMsg<T>where
T: CuMsgPayload + BorrowDecode<'__de, __Context>,
impl<'__de, T, __Context> BorrowDecode<'__de, __Context> for CuMsg<T>where
T: CuMsgPayload + 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.
impl<'cl, T: CuMsgPayload> CuMsgPack<'cl> for &'cl CuMsg<T>
impl<'cl, T: CuMsgPayload> CuMsgPack<'cl> for &'cl mut CuMsg<T>
Auto Trait Implementations§
impl<T> Freeze for CuMsg<T>where
T: Freeze,
impl<T> RefUnwindSafe for CuMsg<T>where
T: RefUnwindSafe,
impl<T> Send for CuMsg<T>where
T: Send,
impl<T> Sync for CuMsg<T>where
T: Sync,
impl<T> Unpin for CuMsg<T>where
T: Unpin,
impl<T> UnwindSafe for CuMsg<T>where
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