pub struct Serialised {
pub ser_id: u64,
pub data: Bytes,
}Expand description
Wrapper for serialised data with a serialisation id
The serialisastion id identifies the Serialiser used to serialise the data, and should be used to match the corresponding Deserialiser as well.
Fields§
§ser_id: u64The serialisation id of the serialiser used to serialise the data
data: BytesThe serialised bytes
Trait Implementations§
Source§impl Debug for Serialised
impl Debug for Serialised
Source§impl TryFrom<&dyn Serialisable> for Serialised
impl TryFrom<&dyn Serialisable> for Serialised
Source§fn try_from(
ser: &dyn Serialisable,
) -> Result<Serialised, <Serialised as TryFrom<&dyn Serialisable>>::Error>
fn try_from( ser: &dyn Serialisable, ) -> Result<Serialised, <Serialised as TryFrom<&dyn Serialisable>>::Error>
Performs the conversion.
Source§impl<T, S> TryFrom<(&T, &S)> for Serialisedwhere
T: Debug,
S: Serialiser<T>,
impl<T, S> TryFrom<(&T, &S)> for Serialisedwhere
T: Debug,
S: Serialiser<T>,
Source§impl<E> TryFrom<Result<Serialised, E>> for Serialised
impl<E> TryFrom<Result<Serialised, E>> for Serialised
Source§fn try_from(
res: Result<Serialised, E>,
) -> Result<Serialised, <Serialised as TryFrom<Result<Serialised, E>>>::Error>
fn try_from( res: Result<Serialised, E>, ) -> Result<Serialised, <Serialised as TryFrom<Result<Serialised, E>>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl !Freeze for Serialised
impl RefUnwindSafe for Serialised
impl Send for Serialised
impl Sync for Serialised
impl Unpin for Serialised
impl UnsafeUnpin for Serialised
impl UnwindSafe for Serialised
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