Trait x11rb_protocol::x11_utils::Serialize
source · [−]pub trait Serialize {
type Bytes;
fn serialize(&self) -> Self::Bytes;
fn serialize_into(&self, bytes: &mut Vec<u8>);
}
Expand description
A type implementing this trait can be serialized into X11 raw bytes.
Required Associated Types
Required Methods
fn serialize_into(&self, bytes: &mut Vec<u8>)
fn serialize_into(&self, bytes: &mut Vec<u8>)
Serialize this value into X11 raw bytes, appending the result into bytes
.
When calling this method, the given vector must satisfy assert_eq!(bytes.len() % 4, 0);
.
In words: Its length must be a multiple of four.