Struct wayland_commons::wire::Message [−][src]
A wire message
Fields
sender_id: u32
ID of the object sending this message
opcode: u16
Opcode of the message
args: Vec<Argument>
Arguments of the message
Methods
impl Message
[src]
impl Message
pub fn write_to_buffers<'a, 'b>(
&self,
payload: &'a mut [u32],
fds: &'b mut [RawFd]
) -> Result<(usize, usize), MessageWriteError>
[src]
pub fn write_to_buffers<'a, 'b>(
&self,
payload: &'a mut [u32],
fds: &'b mut [RawFd]
) -> Result<(usize, usize), MessageWriteError>
Serialize the contents of this message into provided buffers
Returns the number of elements writtent in each buffer
Any serialized Fd will be dup()
-ed in the process
pub fn from_raw<'a, 'b>(
raw: &'a [u32],
signature: &[ArgumentType],
fds: &'b [RawFd]
) -> Result<(Message, &'a [u32], &'b [RawFd]), MessageParseError>
[src]
pub fn from_raw<'a, 'b>(
raw: &'a [u32],
signature: &[ArgumentType],
fds: &'b [RawFd]
) -> Result<(Message, &'a [u32], &'b [RawFd]), MessageParseError>
Attempts to parse a single wayland message with the given signature.
If the buffers contains several messages, only the first one will be parsed, and the unused tail of the buffers is returned. If a single message was present, the returned slices should thus be empty.
Errors if the message is malformed.
Trait Implementations
impl Debug for Message
[src]
impl Debug for Message
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Message
[src]
impl Clone for Message
fn clone(&self) -> Message
[src]
fn clone(&self) -> Message
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for Message
[src]
impl PartialEq for Message