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>) -> CuMsg<T>
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> BorrowDecode<'__de> for CuMsg<T>where
T: CuMsgPayload + BorrowDecode<'__de>,
impl<'__de, T> BorrowDecode<'__de> for CuMsg<T>where
T: CuMsgPayload + BorrowDecode<'__de>,
Source§fn borrow_decode<__D>(decoder: &mut __D) -> Result<CuMsg<T>, DecodeError>where
__D: BorrowDecoder<'__de>,
fn borrow_decode<__D>(decoder: &mut __D) -> Result<CuMsg<T>, DecodeError>where
__D: BorrowDecoder<'__de>,
Attempt to decode this type with the given BorrowDecode.
impl<'cl, T> CuMsgPack<'cl> for &'cl CuMsg<T>where
T: CuMsgPayload,
impl<'cl, T> CuMsgPack<'cl> for &'cl mut CuMsg<T>where
T: CuMsgPayload,
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