pub struct Marshaller<T> {
    pub ser: fn(_: &T, _: &mut GrpcSlice) -> Result<()>,
    pub de: fn(_: MessageReader) -> Result<T>,
}
Expand description

Defines how to serialize and deserialize between the specialized type and byte slice.

Fields

ser: fn(_: &T, _: &mut GrpcSlice) -> Result<()>

The serialize function.

de: fn(_: MessageReader) -> Result<T>

The deserialize function.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.