pub struct Message { /* private fields */ }
Implementations§
Source§impl Message
impl Message
pub fn from_parts(bytes: Vec<u8>, handles: Vec<Handle>) -> Self
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns |true| iff this buffer has no more data (bytes or handles).
pub fn clear(&mut self)
pub fn rewind(&mut self)
pub fn bytes(&self) -> &[u8] ⓘ
pub fn take(self) -> (Vec<u8>, Vec<Handle>)
Sourcepub fn write_arg(&mut self, arg: Arg) -> Result<()>
pub fn write_arg(&mut self, arg: Arg) -> Result<()>
Converts the value in |arg| into the appropriate wire format serialization.
Sourcepub fn read_arg(&mut self, arg: ArgKind) -> Result<Arg>
pub fn read_arg(&mut self, arg: ArgKind) -> Result<Arg>
Reads an Arg out of this Message and return the value.
Sourcepub fn read_args(&mut self, args: &[ArgKind]) -> Result<Vec<Arg>>
pub fn read_args(&mut self, args: &[ArgKind]) -> Result<Vec<Arg>>
Reads the set of arguments specified by the given &ArgKind.
Sourcepub fn write_args(&mut self, args: Vec<Arg>) -> Result<()>
pub fn write_args(&mut self, args: Vec<Arg>) -> Result<()>
Reads the set of arguments specified by the given &ArgKind.
Sourcepub fn peek_header(&mut self) -> Result<MessageHeader>
pub fn peek_header(&mut self) -> Result<MessageHeader>
Reads a |MessageHeader| without advancing the read pointer in the underlying buffer.
pub fn read_header(&mut self) -> Result<MessageHeader>
pub fn write_header(&mut self, header: &MessageHeader) -> Result<()>
Trait Implementations§
Source§impl From<MessageBuf> for Message
impl From<MessageBuf> for Message
Convert from the zx::MessageBuf we get out of the channel.
Source§fn from(buf: MessageBuf) -> Self
fn from(buf: MessageBuf) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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