pub struct Bincode<Item, SinkItem, O = DefaultOptions> { /* private fields */ }
Available on crate feature bincode only.
Expand description

Bincode codec using bincode crate.

Trait Implementations§

source§

impl<Item, SinkItem, O> Debug for Bincode<Item, SinkItem, O>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Item, SinkItem> Default for Bincode<Item, SinkItem>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<Item, SinkItem, O> Deserializer<Item> for Bincode<Item, SinkItem, O>
where for<'a> Item: Deserialize<'a>, O: Options + Clone,

§

type Error = Error

source§

fn deserialize( self: Pin<&mut Self>, src: &BytesMut ) -> Result<Item, Self::Error>

Deserializes a value from buf Read more
source§

impl<Item, SinkItem, O> From<O> for Bincode<Item, SinkItem, O>
where O: Options,

source§

fn from(options: O) -> Self

Converts to this type from the input type.
source§

impl<Item, SinkItem, O> Serializer<SinkItem> for Bincode<Item, SinkItem, O>
where SinkItem: Serialize, O: Options + Clone,

§

type Error = Error

source§

fn serialize( self: Pin<&mut Self>, item: &SinkItem ) -> Result<Bytes, Self::Error>

Serializes item into a new buffer Read more

Auto Trait Implementations§

§

impl<Item, SinkItem, O> RefUnwindSafe for Bincode<Item, SinkItem, O>
where Item: RefUnwindSafe, O: RefUnwindSafe, SinkItem: RefUnwindSafe,

§

impl<Item, SinkItem, O> Send for Bincode<Item, SinkItem, O>
where Item: Send, O: Send, SinkItem: Send,

§

impl<Item, SinkItem, O> Sync for Bincode<Item, SinkItem, O>
where Item: Sync, O: Sync, SinkItem: Sync,

§

impl<Item, SinkItem, O> Unpin for Bincode<Item, SinkItem, O>
where Item: Unpin, O: Unpin, SinkItem: Unpin,

§

impl<Item, SinkItem, O> UnwindSafe for Bincode<Item, SinkItem, O>
where Item: UnwindSafe, O: UnwindSafe, SinkItem: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.