[][src]Struct keebrs::codec::PostCardCodec

pub struct PostCardCodec<T> { /* fields omitted */ }

Codec for arbitrary types via PostCard

Implementations

impl<T> PostCardCodec<T> where
    T: DeserializeOwned
[src]

pub fn stream<S: Read, B: Default + AsRef<[u8]> + AsMut<[u8]>>(
    stream: S
) -> Framed<S, Self, B>
[src]

Wrap a [Read] to create a stream of messages

impl<T> PostCardCodec<T>[src]

pub fn framed<S, B: Default + AsRef<[u8]> + AsMut<[u8]>>(
    stream: S
) -> Framed<S, Self, B>
[src]

Wrap a stream to create a sink or stream for messages

impl<T> PostCardCodec<T> where
    T: Serialize
[src]

pub fn sink<S: Write, B: Default + AsRef<[u8]> + AsMut<[u8]>>(
    stream: S
) -> Framed<S, Self, B>
[src]

Wrap a [Write] to create a sink for messages

Trait Implementations

impl<T> Decode for PostCardCodec<T> where
    T: DeserializeOwned
[src]

type Item = T

The item being decoded

type Error = Error

The error that may arise from a decode operation Read more

impl<T> Default for PostCardCodec<T>[src]

impl<T> Encode for PostCardCodec<T> where
    T: Serialize
[src]

type Item = T

The item being encoded

type Error = Error

The error that may arise from serializing the value

Auto Trait Implementations

impl<T> Send for PostCardCodec<T> where
    T: Send

impl<T> Sync for PostCardCodec<T> where
    T: Sync

impl<T> Unpin for PostCardCodec<T> where
    T: Unpin

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.