pub struct ClipBuilder { /* private fields */ }Expand description
Clip entry stream (§3.11) for ClipHandle::append. Each method
appends one entry: a gap run or one ClipFrame.
Implementations§
Source§impl ClipBuilder
impl ClipBuilder
Sourcepub fn new() -> ClipBuilder
pub fn new() -> ClipBuilder
Empty builder.
Sourcepub fn gap(&mut self, frames: u16) -> &mut Self
pub fn gap(&mut self, frames: u16) -> &mut Self
Gap run: emit nothing for frames native frames (the endpoint NAKs like an idle mouse).
Sourcepub fn edge(&mut self, input: impl Into<Usage>, action: Action) -> &mut Self
pub fn edge(&mut self, input: impl Into<Usage>, action: Action) -> &mut Self
Frame with one edge (any input class).
Sourcepub fn press(&mut self, usage: impl Into<Usage>) -> &mut Self
pub fn press(&mut self, usage: impl Into<Usage>) -> &mut Self
Frame pressing a button, key or media usage, like Device::press.
Sourcepub fn release(&mut self, usage: impl Into<Usage>) -> &mut Self
pub fn release(&mut self, usage: impl Into<Usage>) -> &mut Self
Frame soft-releasing a usage (clears the injected press; a physical hold stays).
Sourcepub fn force_release(&mut self, usage: impl Into<Usage>) -> &mut Self
pub fn force_release(&mut self, usage: impl Into<Usage>) -> &mut Self
Frame force-releasing a usage (masks a physical hold too).
Sourcepub fn raw(
&mut self,
ep: u8,
direction: Direction,
bytes: impl Into<Vec<u8>>,
) -> &mut Self
pub fn raw( &mut self, ep: u8, direction: Direction, bytes: impl Into<Vec<u8>>, ) -> &mut Self
Frame with one raw report (see ClipFrame::raw).
Sourcepub fn transfer(
&mut self,
ep: u8,
setup: Setup,
out: impl Into<Vec<u8>>,
) -> &mut Self
pub fn transfer( &mut self, ep: u8, setup: Setup, out: impl Into<Vec<u8>>, ) -> &mut Self
Frame with one control transfer (see ClipFrame::transfer).
Sourcepub fn byte_len(&self) -> usize
pub fn byte_len(&self) -> usize
Ring bytes the entries take, to check against ClipStatus::free before an
append.
Trait Implementations§
Source§impl Clone for ClipBuilder
impl Clone for ClipBuilder
Source§impl Debug for ClipBuilder
impl Debug for ClipBuilder
Source§impl Default for ClipBuilder
impl Default for ClipBuilder
impl Eq for ClipBuilder
Source§impl PartialEq for ClipBuilder
impl PartialEq for ClipBuilder
impl StructuralPartialEq for ClipBuilder
Auto Trait Implementations§
impl Freeze for ClipBuilder
impl RefUnwindSafe for ClipBuilder
impl Send for ClipBuilder
impl Sync for ClipBuilder
impl Unpin for ClipBuilder
impl UnsafeUnpin for ClipBuilder
impl UnwindSafe for ClipBuilder
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