pub struct SamplePayload {
pub context1: Context1,
pub context2: Context2,
}Fields§
§context1: Context1§context2: Context2Implementations§
Source§impl SamplePayload
impl SamplePayload
pub fn new(context1: Context1) -> SamplePayload
Trait Implementations§
Source§impl ByteDeserializeSlice<SamplePayload> for SamplePayload
impl ByteDeserializeSlice<SamplePayload> for SamplePayload
Source§fn byte_deserialize(
des: &mut ByteDeserializerSlice<'_>,
) -> Result<SamplePayload, SerDesError>
fn byte_deserialize( des: &mut ByteDeserializerSlice<'_>, ) -> Result<SamplePayload, SerDesError>
If successful returns a new instance of T type struct, depleting exactly the right amount of bytes from ByteDeserializerSlice
Number of bytes depleted is determined by the struct T itself and its member types.
Source§fn byte_deserialize_take(
des: &mut ByteDeserializerSlice<'_>,
len: usize,
) -> Result<T, SerDesError>
fn byte_deserialize_take( des: &mut ByteDeserializerSlice<'_>, len: usize, ) -> Result<T, SerDesError>
if successful returns a new instance of T type struct, however ONLY depleting a maximum of
len bytes from ByteDeserializerSlice
Intended for types with variable length such as Strings, Vec, etc.
No bytes will be depleted if attempt was not successful.Source§impl ByteSerializeStack for SamplePayload
impl ByteSerializeStack for SamplePayload
fn byte_serialize_stack<const CAP: usize>( &self, ser: &mut ByteSerializerStack<CAP>, ) -> Result<(), SerDesError>
Source§impl ByteSerializedLenOf for SamplePayload
impl ByteSerializedLenOf for SamplePayload
Source§impl Clone for SamplePayload
impl Clone for SamplePayload
Source§fn clone(&self) -> SamplePayload
fn clone(&self) -> SamplePayload
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 Debug for SamplePayload
impl Debug for SamplePayload
Source§impl Default for SamplePayload
impl Default for SamplePayload
Source§fn default() -> SamplePayload
fn default() -> SamplePayload
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SamplePayload
impl<'de> Deserialize<'de> for SamplePayload
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SamplePayload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SamplePayload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SamplePayload
impl PartialEq for SamplePayload
Source§impl Serialize for SamplePayload
impl Serialize for SamplePayload
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 SoupBinTcpPayload<SamplePayload> for SamplePayload
impl StructuralPartialEq for SamplePayload
Auto Trait Implementations§
impl Freeze for SamplePayload
impl RefUnwindSafe for SamplePayload
impl Send for SamplePayload
impl Sync for SamplePayload
impl Unpin for SamplePayload
impl UnwindSafe for SamplePayload
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