pub struct Message { /* private fields */ }

Implementations§

source§

impl Message

source

pub fn new() -> Self

Initialize an empty Message.

source

pub fn from_parts(bytes: Vec<u8>, handles: Vec<Handle>) -> Self

source

pub fn is_empty(&self) -> bool

Returns |true| iff this buffer has no more data (bytes or handles).

source

pub fn clear(&mut self)

source

pub fn rewind(&mut self)

source

pub fn bytes(&self) -> &[u8]

source

pub fn take(self) -> (Vec<u8>, Vec<Handle>)

source

pub fn write_arg(&mut self, arg: Arg) -> Result<()>

Converts the value in |arg| into the appropriate wire format serialization.

source

pub fn read_arg(&mut self, arg: ArgKind) -> Result<Arg>

Reads an Arg out of this Message and return the value.

source

pub fn read_args(&mut self, args: &[ArgKind]) -> Result<Vec<Arg>>

Reads the set of arguments specified by the given &ArgKind.

source

pub fn write_args(&mut self, args: Vec<Arg>) -> Result<()>

Reads the set of arguments specified by the given &ArgKind.

source

pub fn peek_header(&mut self) -> Result<MessageHeader>

Reads a |MessageHeader| without advancing the read pointer in the underlying buffer.

source

pub fn read_header(&mut self) -> Result<MessageHeader>

source

pub fn write_header(&mut self, header: &MessageHeader) -> Result<()>

Trait Implementations§

source§

impl Debug for Message

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<MessageBuf> for Message

Convert from the zx::MessageBuf we get out of the channel.

source§

fn from(buf: MessageBuf) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V