Skip to main content

CommandBuilder

Struct CommandBuilder 

Source
pub struct CommandBuilder { /* private fields */ }
Expand description

Builder for constructing graphics protocol commands

Implementations§

Source§

impl CommandBuilder

Source

pub fn new() -> Self

Create a new command builder

Source

pub fn action(self, action: Action) -> Self

Set the action

Source

pub fn format(self, format: ImageFormat) -> Self

Set the image format

Source

pub fn medium(self, medium: TransmissionMedium) -> Self

Set the transmission medium

Source

pub fn dimensions(self, width: u32, height: u32) -> Self

Set the image dimensions (width, height) in pixels

Source

pub fn image_id(self, id: u32) -> Self

Set the image ID

Source

pub fn image_number(self, number: u32) -> Self

Set the image number (alternative to image ID)

Source

pub fn placement_id(self, id: u32) -> Self

Set the placement ID

Source

pub fn more_data(self, more: bool) -> Self

Set the more data flag

Source

pub fn compression(self, compression: Compression) -> Self

Set compression

Source

pub fn quiet(self, mode: u8) -> Self

Set quiet mode (1 = suppress OK, 2 = suppress errors)

Source

pub fn source_rect(self, x: u32, y: u32, width: u32, height: u32) -> Self

Set the source rectangle (x, y, width, height)

Source

pub fn cell_offset(self, x: u32, y: u32) -> Self

Set cell offset (X, Y) within the current cell

Source

pub fn display_area(self, columns: u32, rows: u32) -> Self

Set display area in columns and rows

Source

pub fn z_index(self, z: i32) -> Self

Set z-index

Source

pub fn cursor_policy(self, policy: CursorPolicy) -> Self

Set cursor policy

Source

pub fn delete_target(self, target: DeleteTarget) -> Self

Set delete target

Source

pub fn path(self, path: impl Into<String>) -> Self

Set file path or shared memory name

Source

pub fn data_range(self, size: usize, offset: usize) -> Self

Set data size and offset for file/shared memory

Source

pub fn unicode_placeholder(self, columns: u16, rows: u16) -> Self

Set unicode placeholder mode

Source

pub fn parent(self, image_id: u32, placement_id: u32) -> Self

Set parent for relative placement

Source

pub fn relative_offset(self, h: i32, v: i32) -> Self

Set relative offset for relative placement

Source

pub fn animation_control(self, control: AnimationControl) -> Self

Set animation control

Source

pub fn frame_number(self, frame: u32) -> Self

Set frame number

Source

pub fn frame_gap(self, gap_ms: i32) -> Self

Set frame gap in milliseconds (negative = gapless frame)

Source

pub fn loop_count(self, count: u32) -> Self

Set loop count (0 = ignored, 1 = infinite)

Source

pub fn background_color(self, color: u32) -> Self

Set background color for frame (RGBA)

Source

pub fn ref_frame(self, frame: u32) -> Self

Set reference frame for composition

Source

pub fn composition(self, comp: FrameComposition) -> Self

Set frame composition parameters

Source

pub fn build(self) -> Command

Build the command

Trait Implementations§

Source§

impl Clone for CommandBuilder

Source§

fn clone(&self) -> CommandBuilder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CommandBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CommandBuilder

Source§

fn default() -> CommandBuilder

Returns the “default value” for a type. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.