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, __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>(decoder: &mut __D) -> Result<CuMsg<T>, DecodeError>where
__D: BorrowDecoder<'__de, Context = __Context>,
fn borrow_decode<__D>(decoder: &mut __D) -> Result<CuMsg<T>, DecodeError>where
__D: BorrowDecoder<'__de, Context = __Context>,
Attempt to decode this type with the given BorrowDecode.
Source§impl<T> ErasedCuMsg for CuMsg<T>where
T: CuMsgPayload,
impl<T> ErasedCuMsg for CuMsg<T>where
T: CuMsgPayload,
fn erased_payload(&self) -> Option<&dyn Serialize>
Source§impl<T> Serialize for CuMsg<T>where
T: CuMsgPayload + Serialize,
impl<T> Serialize for CuMsg<T>where
T: CuMsgPayload + Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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