Struct taple_core::message::MessageContent
source · pub struct MessageContent<T: TaskCommandContent> {
pub sender_id: KeyIdentifier,
pub content: T,
pub receiver: KeyIdentifier,
}
Fields§
§sender_id: KeyIdentifier
§content: T
§receiver: KeyIdentifier
Trait Implementations§
source§impl<T> BorshDeserialize for MessageContent<T>where
KeyIdentifier: BorshDeserialize,
T: BorshDeserialize + TaskCommandContent,
impl<T> BorshDeserialize for MessageContent<T>where KeyIdentifier: BorshDeserialize, T: BorshDeserialize + TaskCommandContent,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where R: Read,
source§impl<T> BorshSerialize for MessageContent<T>where
KeyIdentifier: BorshSerialize,
T: BorshSerialize + TaskCommandContent,
impl<T> BorshSerialize for MessageContent<T>where KeyIdentifier: BorshSerialize, T: BorshSerialize + TaskCommandContent,
source§impl<T: Clone + TaskCommandContent> Clone for MessageContent<T>
impl<T: Clone + TaskCommandContent> Clone for MessageContent<T>
source§fn clone(&self) -> MessageContent<T>
fn clone(&self) -> MessageContent<T>
Returns a copy 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: Debug + TaskCommandContent> Debug for MessageContent<T>
impl<T: Debug + TaskCommandContent> Debug for MessageContent<T>
source§impl<'de, T> Deserialize<'de> for MessageContent<T>where
T: Deserialize<'de> + TaskCommandContent,
impl<'de, T> Deserialize<'de> for MessageContent<T>where T: Deserialize<'de> + TaskCommandContent,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: PartialEq + TaskCommandContent> PartialEq<MessageContent<T>> for MessageContent<T>
impl<T: PartialEq + TaskCommandContent> PartialEq<MessageContent<T>> for MessageContent<T>
source§fn eq(&self, other: &MessageContent<T>) -> bool
fn eq(&self, other: &MessageContent<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> Serialize for MessageContent<T>where
T: Serialize + TaskCommandContent,
impl<T> Serialize for MessageContent<T>where T: Serialize + TaskCommandContent,
impl<T: TaskCommandContent> StructuralPartialEq for MessageContent<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for MessageContent<T>where T: RefUnwindSafe,
impl<T> Send for MessageContent<T>
impl<T> Sync for MessageContent<T>
impl<T> Unpin for MessageContent<T>where T: Unpin,
impl<T> UnwindSafe for MessageContent<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