Struct vortex_ipc::messages::MessageEncoder
source · pub struct MessageEncoder { /* private fields */ }
Implementations§
source§impl MessageEncoder
impl MessageEncoder
sourcepub fn new(alignment: usize) -> Self
pub fn new(alignment: usize) -> Self
Create a new message encoder that pads each message and buffer with the given alignment.
§Panics
Panics if alignment
is greater than u16::MAX
or is not a power of 2.
sourcepub fn encode(&mut self, message: EncoderMessage<'_>) -> Vec<Buffer>
pub fn encode(&mut self, message: EncoderMessage<'_>) -> Vec<Buffer>
Encode an IPC message for writing to a byte stream.
The returned buffers should be written contiguously to the stream.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MessageEncoder
impl RefUnwindSafe for MessageEncoder
impl Send for MessageEncoder
impl Sync for MessageEncoder
impl Unpin for MessageEncoder
impl UnwindSafe for MessageEncoder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more