[−][src]Struct vessels::format::bincode::Bincode
A format implementing bincode
.
bincode is a Rust-specific compact binary over-the-wire format with the unique guarantee of providing smaller or equivalent over-the-wire size for any type as compared to the size of that type in-memory. Unlike JSON and CBOR it is not self describing (but therefore substantially more compact) and given that it is tighly tied to the in-memory layout of Rust data structures it lacks guarantees of stability or compatability across Rust versions. It is, however, entirely validated and safe for untrusted input, and is very performant.
For this format to be used the bincode
feature must be enabled.
Trait Implementations
impl Format for Bincode
[src]
type Representation = Vec<u8>
The underlying representation used by this Format
, i.e. Vec<u8>
for most binary formats and String
for those of a human-readable nature. Read more
type Error = Error
The failure condition of this format. This may be encountered during deserialization.
fn serialize<T: Serialize>(item: T) -> Self::Representation
[src]
fn deserialize<'de, T: DeserializeSeed<'de>>(
item: Self::Representation,
context: T
) -> Fallible<T::Value, (Self::Error, Self::Representation)> where
T: Sync + Send + 'static,
[src]
item: Self::Representation,
context: T
) -> Fallible<T::Value, (Self::Error, Self::Representation)> where
T: Sync + Send + 'static,
Auto Trait Implementations
impl Send for Bincode
impl Sync for Bincode
impl Unpin for Bincode
impl UnwindSafe for Bincode
impl RefUnwindSafe for Bincode
Blanket Implementations
impl<'de, U, K> ApplyDecode<'de, K> for U where
K: Kind,
[src]
K: Kind,
fn decode<T, F>(Self) -> <F as Decode<'de, U, K>>::Output where
F: 'static + Format,
T: 'static + Target<'de, K> + Send + Sync,
U: UniformStreamSink<<F as Format>::Representation> + Sync + Send + 'static,
<F as Format>::Representation: Clone,
<F as Format>::Representation: Sync,
<F as Format>::Representation: Send,
<U as Sink<<F as Format>::Representation>>::Error: ErrorBound,
<T as Context<'de>>::Item: Sync,
<T as Context<'de>>::Item: Send,
[src]
F: 'static + Format,
T: 'static + Target<'de, K> + Send + Sync,
U: UniformStreamSink<<F as Format>::Representation> + Sync + Send + 'static,
<F as Format>::Representation: Clone,
<F as Format>::Representation: Sync,
<F as Format>::Representation: Send,
<U as Sink<<F as Format>::Representation>>::Error: ErrorBound,
<T as Context<'de>>::Item: Sync,
<T as Context<'de>>::Item: Send,
impl<'de, C, T, K> Decode<'de, C, K> for T where
C: 'static + UniformStreamSink<<T as Format>::Representation> + Send + Sync,
K: Kind,
T: 'static + Format,
<T as Format>::Representation: Sync,
<T as Format>::Representation: Send,
<T as Format>::Representation: Clone,
<C as Sink<<T as Format>::Representation>>::Error: ErrorBound,
[src]
C: 'static + UniformStreamSink<<T as Format>::Representation> + Send + Sync,
K: Kind,
T: 'static + Format,
<T as Format>::Representation: Sync,
<T as Format>::Representation: Send,
<T as Format>::Representation: Clone,
<C as Sink<<T as Format>::Representation>>::Error: ErrorBound,
type Output = Pin<Box<dyn Future<Output = Result<K, <K as Kind>::ConstructError>> + 'static + Sync + Send>>
fn decode<U>(C) -> <T as Decode<'de, C, K>>::Output where
U: 'static + Target<'de, K> + Send + Sync,
<U as Context<'de>>::Item: Sync,
<U as Context<'de>>::Item: Send,
[src]
U: 'static + Target<'de, K> + Send + Sync,
<U as Context<'de>>::Item: Sync,
<U as Context<'de>>::Item: Send,
impl<'de, T, C> Encode<'de, C> for T where
C: 'static + Context<'de> + UniformStreamSink<<C as Context<'de>>::Item> + Send + Sync,
T: 'static + Format,
<T as Format>::Representation: Sync,
<T as Format>::Representation: Send,
<T as Format>::Representation: Clone,
<C as Context<'de>>::Item: Sync,
<C as Context<'de>>::Item: Send,
<C as Sink<<C as Context<'de>>::Item>>::Error: ErrorBound,
[src]
C: 'static + Context<'de> + UniformStreamSink<<C as Context<'de>>::Item> + Send + Sync,
T: 'static + Format,
<T as Format>::Representation: Sync,
<T as Format>::Representation: Send,
<T as Format>::Representation: Clone,
<C as Context<'de>>::Item: Sync,
<C as Context<'de>>::Item: Send,
<C as Sink<<C as Context<'de>>::Item>>::Error: ErrorBound,
type Output = SinkStream<<T as Format>::Representation, EncodeError<T, <C as Context<'de>>::Item, C>, <T as Format>::Representation>
fn encode(C) -> <T as Encode<'de, C>>::Output
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,