pub struct Encoder<T, E, R> { /* private fields */ }
Expand description
An encoder for a single message of type T
, using the messaging encoding
E
.
Implementations§
source§impl<R, T> Encoder<T, <T as DefaultEncoding>::Encoding, R>
impl<R, T> Encoder<T, <T as DefaultEncoding>::Encoding, R>
sourcepub fn new(message: T) -> Encoder<T, <T as DefaultEncoding>::Encoding, R>
pub fn new(message: T) -> Encoder<T, <T as DefaultEncoding>::Encoding, R>
Creates an encoder for message
.F
source§impl<T, R, E> Encoder<T, E, R>where
E: MessageEncode<T, R>,
impl<T, R, E> Encoder<T, E, R>where
E: MessageEncode<T, R>,
sourcepub fn with_encoding(message: T) -> Encoder<T, E, R>
pub fn with_encoding(message: T) -> Encoder<T, E, R>
Creates an encoder for message
with a specific encoder.
sourcepub fn resource_count(&self) -> usize
pub fn resource_count(&self) -> usize
Returns the number of resources in the message.
sourcepub fn encode_into(self, buffer: &mut dyn Buffer, resources: &mut Vec<R>)
pub fn encode_into(self, buffer: &mut dyn Buffer, resources: &mut Vec<R>)
Encodes the message into buffer
.
Auto Trait Implementations§
impl<T, E, R> Freeze for Encoder<T, E, R>where
T: Freeze,
impl<T, E, R> RefUnwindSafe for Encoder<T, E, R>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E, R> Send for Encoder<T, E, R>
impl<T, E, R> Sync for Encoder<T, E, R>
impl<T, E, R> Unpin for Encoder<T, E, R>
impl<T, E, R> UnwindSafe for Encoder<T, E, R>where
T: UnwindSafe,
E: 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