[][src]Struct protocol::types::Unimplemented

pub struct Unimplemented;

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

impl Parcel for Unimplemented[src]

fn read(read: &mut dyn Read, settings: &Settings) -> Result<Self, Error>[src]

Reads a new item with a fresh set of hints. Read more

fn write(&self, write: &mut dyn Write, settings: &Settings) -> Result<(), Error>[src]

Writes a value to a stream.

fn into_stream(self, settings: &Settings) -> Result<Cursor<Vec<u8>>, Error>[src]

Convers the value into a byte stream that implements std::io::Read.

fn from_raw_bytes(bytes: &[u8], settings: &Settings) -> Result<Self, Error>[src]

Parses a new value from its raw byte representation. Read more

fn field_from_raw_bytes(
    bytes: &[u8],
    settings: &Settings,
    hints: &mut Hints
) -> Result<Self, Error>
[src]

Parses a new value from its raw byte representation. Read more

fn raw_bytes(&self, settings: &Settings) -> Result<Vec<u8>, Error>[src]

Gets the raw byte representation of the value.

fn raw_bytes_field(
    &self,
    settings: &Settings,
    hints: &mut Hints
) -> Result<Vec<u8>, Error>
[src]

Gets the raw bytes of this type as a field of a larger type.

fn type_name(&self) -> &'static str[src]

Gets the name of the type; Parcel::TYPE_NAME.

impl Eq for Unimplemented[src]

impl Copy for Unimplemented[src]

impl PartialOrd<Unimplemented> for Unimplemented[src]

#[must_use]
default fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
default fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
default fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
default fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq<Unimplemented> for Unimplemented[src]

#[must_use]
default fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for Unimplemented[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for Unimplemented[src]

default fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

default fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

default fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Debug for Unimplemented[src]

impl Hash for Unimplemented[src]

default fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.