pub struct ProstSerializer<Message> { /* private fields */ }Expand description
A stateless implementation of Serialize using prost
Trait Implementations§
Source§impl<Message: Debug> Debug for ProstSerializer<Message>
impl<Message: Debug> Debug for ProstSerializer<Message>
Source§impl<Message: Default> Default for ProstSerializer<Message>
impl<Message: Default> Default for ProstSerializer<Message>
Source§fn default() -> ProstSerializer<Message>
fn default() -> ProstSerializer<Message>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<Message> Freeze for ProstSerializer<Message>
impl<Message> RefUnwindSafe for ProstSerializer<Message>where
Message: RefUnwindSafe,
impl<Message> Send for ProstSerializer<Message>where
Message: Send,
impl<Message> Sync for ProstSerializer<Message>where
Message: Sync,
impl<Message> Unpin for ProstSerializer<Message>where
Message: Unpin,
impl<Message> UnsafeUnpin for ProstSerializer<Message>
impl<Message> UnwindSafe for ProstSerializer<Message>where
Message: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Encoder for Twhere
T: Serialize,
impl<T> Encoder for Twhere
T: Serialize,
Source§type Serialized = OwnedBuffer
type Serialized = OwnedBuffer
The type this serializer produces. Read more
Source§fn encode(
&mut self,
message: <T as Encoder>::Message,
) -> <T as Encoder>::Serialized
fn encode( &mut self, message: <T as Encoder>::Message, ) -> <T as Encoder>::Serialized
Encode a message into a buffer.
Source§fn return_buffer(&mut self, _buffer: Self::Serialized)
fn return_buffer(&mut self, _buffer: Self::Serialized)
Buffers are sent back to the encoder once the message is sent.
Buffers are not guaranteed to be advanced to the end.
You can reset and reuse your buffer, if appropriate.