Struct protocol::types::Unimplemented
source · [−]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
sourceimpl Clone for Unimplemented
impl Clone for Unimplemented
sourcefn clone(&self) -> Unimplemented
fn clone(&self) -> Unimplemented
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Unimplemented
impl Debug for Unimplemented
sourceimpl Hash for Unimplemented
impl Hash for Unimplemented
sourceimpl Ord for Unimplemented
impl Ord for Unimplemented
sourcefn cmp(&self, other: &Unimplemented) -> Ordering
fn cmp(&self, other: &Unimplemented) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl Parcel for Unimplemented
impl Parcel for Unimplemented
sourcefn 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
sourcefn 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.
sourcefn 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
sourcefn 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.
sourcefn 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
.
sourcefn 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
sourcefn 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
sourcefn 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.
sourceimpl PartialEq<Unimplemented> for Unimplemented
impl PartialEq<Unimplemented> for Unimplemented
sourcefn eq(&self, other: &Unimplemented) -> bool
fn eq(&self, other: &Unimplemented) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialOrd<Unimplemented> for Unimplemented
impl PartialOrd<Unimplemented> for Unimplemented
sourcefn partial_cmp(&self, other: &Unimplemented) -> Option<Ordering>
fn partial_cmp(&self, other: &Unimplemented) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Unimplemented
impl Eq for Unimplemented
impl StructuralEq for Unimplemented
impl StructuralPartialEq for Unimplemented
Auto Trait Implementations
impl RefUnwindSafe for Unimplemented
impl Send for Unimplemented
impl Sync for Unimplemented
impl Unpin for Unimplemented
impl UnwindSafe for Unimplemented
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more