fuchsia_wayland_core

Struct Message

Source
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>,

Source§

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>,

Source§

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