pub struct Unimplemented;
Expand description
A type that does not have any protocol serialization implemented.
§Behaviour
If any unimplemented parcel is read, an error of type
UnimplementedParcel
is returned. This allows clients to
handle unimplemented data gracefully.
If you attempt to write an unimplemented parcel, the program panics. It makes sense to do error handling on unimplemented types that are read from remote machines, but it does not make sense to allow undefined data to be sent.
Trait Implementations§
Source§impl Clone for Unimplemented
impl Clone for Unimplemented
Source§fn clone(&self) -> Unimplemented
fn clone(&self) -> Unimplemented
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 Unimplemented
impl Debug for Unimplemented
Source§impl Hash for Unimplemented
impl Hash for Unimplemented
Source§impl Ord for Unimplemented
impl Ord for Unimplemented
Source§fn cmp(&self, other: &Unimplemented) -> Ordering
fn cmp(&self, other: &Unimplemented) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl Parcel for Unimplemented
impl Parcel for Unimplemented
Source§fn read_field(
_: &mut dyn Read,
_: &Settings,
_: &mut Hints,
) -> Result<Self, Error>
fn read_field( _: &mut dyn Read, _: &Settings, _: &mut Hints, ) -> Result<Self, Error>
Reads a value from a stream. Read more
Source§fn write_field(
&self,
_: &mut dyn Write,
_: &Settings,
_: &mut Hints,
) -> Result<(), Error>
fn write_field( &self, _: &mut dyn Write, _: &Settings, _: &mut Hints, ) -> Result<(), Error>
Writes a value to a stream.
Source§fn read(read: &mut dyn Read, settings: &Settings) -> Result<Self, Error>
fn read(read: &mut dyn Read, settings: &Settings) -> Result<Self, Error>
Reads a new item with a fresh set of hints. Read more
Source§fn write(&self, write: &mut dyn Write, settings: &Settings) -> Result<(), Error>
fn write(&self, write: &mut dyn Write, settings: &Settings) -> Result<(), Error>
Writes a value to a stream.
Source§fn into_stream(self, settings: &Settings) -> Result<Cursor<Vec<u8>>, Error>
fn into_stream(self, settings: &Settings) -> Result<Cursor<Vec<u8>>, Error>
Convers the value into a byte stream that implements
std::io::Read
.Source§fn from_raw_bytes(bytes: &[u8], settings: &Settings) -> Result<Self, Error>
fn from_raw_bytes(bytes: &[u8], settings: &Settings) -> Result<Self, Error>
Parses a new value from its raw byte representation. Read more
Source§fn field_from_raw_bytes(
bytes: &[u8],
settings: &Settings,
hints: &mut Hints,
) -> Result<Self, Error>
fn field_from_raw_bytes( bytes: &[u8], settings: &Settings, hints: &mut Hints, ) -> Result<Self, Error>
Parses a new value from its raw byte representation. Read more
Source§fn raw_bytes(&self, settings: &Settings) -> Result<Vec<u8>, Error>
fn raw_bytes(&self, settings: &Settings) -> Result<Vec<u8>, Error>
Gets the raw byte representation of the value.
Source§impl PartialEq for Unimplemented
impl PartialEq for Unimplemented
Source§impl PartialOrd for Unimplemented
impl PartialOrd for Unimplemented
impl Copy for Unimplemented
impl Eq for Unimplemented
impl StructuralPartialEq for Unimplemented
Auto Trait Implementations§
impl Freeze for Unimplemented
impl RefUnwindSafe for Unimplemented
impl Send for Unimplemented
impl Sync for Unimplemented
impl Unpin for Unimplemented
impl UnwindSafe for Unimplemented
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