pub struct X11WireEncoder { /* private fields */ }Expand description
Pure-Rust X11 wire protocol request encoder.
Implementations§
Source§impl X11WireEncoder
impl X11WireEncoder
Sourcepub fn begin_request(&mut self, opcode: u8, detail: u8)
pub fn begin_request(&mut self, opcode: u8, detail: u8)
Reserves space for the 4-byte X11 request header: [opcode, detail, len_lo, len_hi].
Sourcepub fn finish_request(&mut self)
pub fn finish_request(&mut self)
Finalizes the request header by calculating total length in 4-byte words, padding as needed.
Sourcepub fn push_bytes(&mut self, bytes: &[u8])
pub fn push_bytes(&mut self, bytes: &[u8])
Appends arbitrary raw bytes.
Sourcepub fn push_padded_string(&mut self, s: &str)
pub fn push_padded_string(&mut self, s: &str)
Appends a string and aligns the buffer to a 4-byte boundary.
Trait Implementations§
Source§impl Debug for X11WireEncoder
impl Debug for X11WireEncoder
Auto Trait Implementations§
impl Forget for X11WireEncoder
impl Freeze for X11WireEncoder
impl Move for X11WireEncoder
impl RefUnwindSafe for X11WireEncoder
impl Send for X11WireEncoder
impl Sync for X11WireEncoder
impl Unpin for X11WireEncoder
impl UnsafeUnpin for X11WireEncoder
impl UnwindSafe for X11WireEncoder
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