pub struct Client { /* private fields */ }Expand description
Handles all interactions between the ccanvas server and your code.
Implementations§
Source§impl Client
impl Client
Sourcepub async fn new(config: ClientConfig) -> Self
pub async fn new(config: ClientConfig) -> Self
Create a new instance of self, will panic if connection fails.
Sourcepub async fn recv(&self) -> Event
pub async fn recv(&self) -> Event
Waits for an event from ccanvas.
There should only be one active recv() for each Client,
more than one recv() at a time leads to undetermined behaviour on who gets the event.
Sourcepub async fn send(&self, req: Request) -> ResponseContent
pub async fn send(&self, req: Request) -> ResponseContent
Send a request and waits for response This is a private method as the task specific functions should be used instead.
Source§impl Client
Task specific functions.
impl Client
Task specific functions.
Sourcepub async fn subscribe<T: Into<(Subscription, Option<u32>)>>(
&self,
channel: T,
) -> ResponseContent
pub async fn subscribe<T: Into<(Subscription, Option<u32>)>>( &self, channel: T, ) -> ResponseContent
Subscribe to one channel.
Sourcepub async fn subscribe_multiple<T: Into<(Subscription, Option<u32>)>>(
&self,
channels: Vec<T>,
) -> ResponseContent
pub async fn subscribe_multiple<T: Into<(Subscription, Option<u32>)>>( &self, channels: Vec<T>, ) -> ResponseContent
Subscribe to multiple channels at once.
Sourcepub async fn unsubscribe(&self, channel: Subscription) -> ResponseContent
pub async fn unsubscribe(&self, channel: Subscription) -> ResponseContent
Unsubscribe from one channels.
Sourcepub async fn exit(&self) -> ResponseContent
pub async fn exit(&self) -> ResponseContent
Tell the ccanvas server to exit immetiately.
Alias to self.drop_component(Discriminator::master())
Sourcepub async fn drop_component(&self, discrim: Discriminator) -> ResponseContent
pub async fn drop_component(&self, discrim: Discriminator) -> ResponseContent
Drop a single component.
Sourcepub fn setcharcoloured(&self, x: u32, y: u32, c: char, fg: Colour, bg: Colour)
pub fn setcharcoloured(&self, x: u32, y: u32, c: char, fg: Colour, bg: Colour)
Add a set character (coloured) task to the render queue.
Sourcepub fn setcursorstyle(&self, style: CursorStyle)
pub fn setcursorstyle(&self, style: CursorStyle)
Add a set cursor style task to render queue.
Sourcepub fn showcursor(&self)
pub fn showcursor(&self)
Add a show cursor task to render queue.
Sourcepub fn hidecursor(&self)
pub fn hidecursor(&self)
Add a hide cursor task to render queue.
Sourcepub fn clear_area(&self, x: u32, y: u32, width: u32, height: u32)
pub fn clear_area(&self, x: u32, y: u32, width: u32, height: u32)
Add a clear area task to render queue.
Sourcepub async fn renderall(&self) -> ResponseContent
pub async fn renderall(&self) -> ResponseContent
Flush and complete all tasks in render queue.
Sourcepub async fn spawn_at(
&self,
label: String,
command: String,
args: Vec<String>,
parent: Discriminator,
) -> ResponseContent
pub async fn spawn_at( &self, label: String, command: String, args: Vec<String>, parent: Discriminator, ) -> ResponseContent
Spawn a new process at a specific space.
Sourcepub async fn spawn_with_env_at(
&self,
label: String,
command: String,
args: Vec<String>,
parent: Discriminator,
env: BTreeMap<String, String>,
) -> ResponseContent
pub async fn spawn_with_env_at( &self, label: String, command: String, args: Vec<String>, parent: Discriminator, env: BTreeMap<String, String>, ) -> ResponseContent
Spawn a new process at a specific space with environment vars
Sourcepub async fn spawn(
&self,
label: String,
command: String,
args: Vec<String>,
) -> ResponseContent
pub async fn spawn( &self, label: String, command: String, args: Vec<String>, ) -> ResponseContent
Spawn a new process in the same parent space.
Sourcepub async fn spawn_with_env(
&self,
label: String,
command: String,
args: Vec<String>,
env: BTreeMap<String, String>,
) -> ResponseContent
pub async fn spawn_with_env( &self, label: String, command: String, args: Vec<String>, env: BTreeMap<String, String>, ) -> ResponseContent
Spawn a new process in the same parent space.
Sourcepub async fn focus_at(&self, discrim: Discriminator) -> ResponseContent
pub async fn focus_at(&self, discrim: Discriminator) -> ResponseContent
Set focus to a space.
Sourcepub async fn new_space(
&self,
parent: Discriminator,
label: String,
) -> ResponseContent
pub async fn new_space( &self, parent: Discriminator, label: String, ) -> ResponseContent
Create a new space.
Sourcepub async fn message(
&self,
target: Discriminator,
content: Value,
tag: String,
) -> ResponseContent
pub async fn message( &self, target: Discriminator, content: Value, tag: String, ) -> ResponseContent
Send a message to a component.
If the selected component is a space, then all its members (including subspaces) will also recieve the message. Including the sender copmonent.
Sourcepub async fn broadcast(&self, content: Value, tag: String) -> ResponseContent
pub async fn broadcast(&self, content: Value, tag: String) -> ResponseContent
Send a message to all components, including self.
Alias to client.message(Discriminator::master(), message)
Sourcepub fn discrim(&self) -> &Discriminator
pub fn discrim(&self) -> &Discriminator
Get the discriminator of the current (process) component.
Sourcepub async fn is_focused(&self) -> bool
pub async fn is_focused(&self) -> bool
Check if parent space is in focus.
Returns true if it is the focused element, or child of the focused element.
Sourcepub async fn focused(&self) -> Discriminator
pub async fn focused(&self) -> Discriminator
Returns discriminator of the currently focused component.
Sourcepub async fn current_directory(&self) -> PathBuf
pub async fn current_directory(&self) -> PathBuf
Returns the full path to which the ccanvas command is ran.
Sourcepub async fn watch(
&self,
label: String,
target: Discriminator,
) -> ResponseContent
pub async fn watch( &self, label: String, target: Discriminator, ) -> ResponseContent
Subscribe to changes of a variable.
Sourcepub async fn unwatch(
&self,
label: String,
target: Discriminator,
) -> ResponseContent
pub async fn unwatch( &self, label: String, target: Discriminator, ) -> ResponseContent
Remove subscription to changes of a variable.
Sourcepub async fn watch_self(&self, label: String) -> ResponseContent
pub async fn watch_self(&self, label: String) -> ResponseContent
Subscribe to changes of a variable owned by the current (process) component.
Sourcepub async fn unwatch_self(&self, label: String) -> ResponseContent
pub async fn unwatch_self(&self, label: String) -> ResponseContent
Remove subscription to changes of a variable owned by the current (process) component.
Sourcepub async fn set(
&self,
label: String,
target: Discriminator,
value: Value,
) -> ResponseContent
pub async fn set( &self, label: String, target: Discriminator, value: Value, ) -> ResponseContent
Set a variable.
Sourcepub async fn set_self(&self, label: String, value: Value) -> ResponseContent
pub async fn set_self(&self, label: String, value: Value) -> ResponseContent
Set a variable owned by the current (process) component.
Sourcepub async fn get_raw(
&self,
label: String,
target: Discriminator,
) -> ResponseContent
pub async fn get_raw( &self, label: String, target: Discriminator, ) -> ResponseContent
Get a variable with raw responses.
Sourcepub async fn get(&self, label: String, target: Discriminator) -> Option<Value>
pub async fn get(&self, label: String, target: Discriminator) -> Option<Value>
Get a variable, returning an Option<Value>.
Sourcepub async fn get_self(&self, label: String) -> Option<Value>
pub async fn get_self(&self, label: String) -> Option<Value>
Get a variable owned by the current (process) component, returning an Option<Value>.
Sourcepub async fn remove(
&self,
label: String,
target: Discriminator,
) -> ResponseContent
pub async fn remove( &self, label: String, target: Discriminator, ) -> ResponseContent
Remove a variable.
Sourcepub async fn remove_self(&self, label: String) -> ResponseContent
pub async fn remove_self(&self, label: String) -> ResponseContent
Remove a variable owned by the current (process) component.
Sourcepub async fn suppress_at(
&self,
channel: Subscription,
priority: u32,
target: Discriminator,
) -> ResponseContent
pub async fn suppress_at( &self, channel: Subscription, priority: u32, target: Discriminator, ) -> ResponseContent
Suppress all subscriptions of that channel with a lower than specified priority
Sourcepub async fn unsuppress_at(
&self,
channel: Subscription,
id: u32,
target: Discriminator,
) -> ResponseContent
pub async fn unsuppress_at( &self, channel: Subscription, id: u32, target: Discriminator, ) -> ResponseContent
Remove suppress for a single suppressor
Sourcepub async fn suppress(
&self,
channel: Subscription,
priority: u32,
target: Discriminator,
) -> Option<LifetimeSuppressor>
pub async fn suppress( &self, channel: Subscription, priority: u32, target: Discriminator, ) -> Option<LifetimeSuppressor>
Suppress a channel within the lifetime of the returned LifetimeSuppressor
Sourcepub async fn unsuppress(&self, suppressor: LifetimeSuppressor) -> bool
pub async fn unsuppress(&self, suppressor: LifetimeSuppressor) -> bool
Remove suppress using a lifetime suppressor.
Source§impl Client
impl Client
Sourcepub async fn spawn_layouted(
&self,
label: String,
command: String,
args: Vec<String>,
) -> ResponseContent
pub async fn spawn_layouted( &self, label: String, command: String, args: Vec<String>, ) -> ResponseContent
Spawn a new process in the same parent space to use ccanvas-layout
Sourcepub async fn spawn_at_layouted(
&self,
label: String,
command: String,
args: Vec<String>,
parent: Discriminator,
) -> ResponseContent
pub async fn spawn_at_layouted( &self, label: String, command: String, args: Vec<String>, parent: Discriminator, ) -> ResponseContent
Spawn a new process at a specific space to use ccanvas-layout
Sourcepub async fn spawn_with_env_at_layouted(
&self,
label: String,
command: String,
args: Vec<String>,
parent: Discriminator,
env: BTreeMap<String, String>,
) -> ResponseContent
pub async fn spawn_with_env_at_layouted( &self, label: String, command: String, args: Vec<String>, parent: Discriminator, env: BTreeMap<String, String>, ) -> ResponseContent
Spawn a new process at a specific space with additional env to use ccanvas-layout
Sourcepub async fn spawn_with_env_layouted(
&self,
label: String,
command: String,
args: Vec<String>,
env: BTreeMap<String, String>,
) -> ResponseContent
pub async fn spawn_with_env_layouted( &self, label: String, command: String, args: Vec<String>, env: BTreeMap<String, String>, ) -> ResponseContent
Spawn a new process at a specific space with additional env to use ccanvas-layout
Source§impl Client
impl Client
Sourcepub fn layout(&self, discrim: Discriminator) -> LayoutComponent
pub fn layout(&self, discrim: Discriminator) -> LayoutComponent
Return the LayoutComponent struct from a discriminator
Sourcepub async fn layout_add(
&self,
layout: Discriminator,
at: Vec<Direction>,
split: Direction,
constraint_1: Constraint,
constraint_2: Constraint,
component: Option<Discriminator>,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add( &self, layout: Discriminator, at: Vec<Direction>, split: Direction, constraint_1: Constraint, constraint_2: Constraint, component: Option<Discriminator>, border: Option<Border>, ) -> ResponseContent
Add a new layout section
Sourcepub async fn layout_add_blank(
&self,
layout: Discriminator,
at: Vec<Direction>,
split: Direction,
constraint_1: Constraint,
constraint_2: Constraint,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_blank( &self, layout: Discriminator, at: Vec<Direction>, split: Direction, constraint_1: Constraint, constraint_2: Constraint, border: Option<Border>, ) -> ResponseContent
Add a new blank layout section
Sourcepub async fn layout_add_component(
&self,
layout: Discriminator,
at: Vec<Direction>,
split: Direction,
constraint_1: Constraint,
constraint_2: Constraint,
component: Discriminator,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_component( &self, layout: Discriminator, at: Vec<Direction>, split: Direction, constraint_1: Constraint, constraint_2: Constraint, component: Discriminator, border: Option<Border>, ) -> ResponseContent
Add a new component layout section
Sourcepub async fn layout_add_below(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
component: Option<Discriminator>,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_below( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, component: Option<Discriminator>, border: Option<Border>, ) -> ResponseContent
Add a new layout section below target
Sourcepub async fn layout_add_above(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
component: Option<Discriminator>,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_above( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, component: Option<Discriminator>, border: Option<Border>, ) -> ResponseContent
Add a new layout section above target
Sourcepub async fn layout_add_left(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
component: Option<Discriminator>,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_left( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, component: Option<Discriminator>, border: Option<Border>, ) -> ResponseContent
Add a new layout section to the left of target
Sourcepub async fn layout_add_right(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
component: Option<Discriminator>,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_right( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, component: Option<Discriminator>, border: Option<Border>, ) -> ResponseContent
Add a new layout section to the right of target
Sourcepub async fn layout_add_bordered(
&self,
layout: Discriminator,
at: Vec<Direction>,
split: Direction,
constraint_1: Constraint,
constraint_2: Constraint,
component: Option<Discriminator>,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered( &self, layout: Discriminator, at: Vec<Direction>, split: Direction, constraint_1: Constraint, constraint_2: Constraint, component: Option<Discriminator>, border: Border, ) -> ResponseContent
Add a new bordered layout section
Sourcepub async fn layout_add_unbordered(
&self,
layout: Discriminator,
at: Vec<Direction>,
split: Direction,
constraint_1: Constraint,
constraint_2: Constraint,
component: Option<Discriminator>,
) -> ResponseContent
pub async fn layout_add_unbordered( &self, layout: Discriminator, at: Vec<Direction>, split: Direction, constraint_1: Constraint, constraint_2: Constraint, component: Option<Discriminator>, ) -> ResponseContent
Add a new unbordered layout section
Source§impl Client
impl Client
Sourcepub async fn layout_add_blank_above(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_blank_above( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, border: Option<Border>, ) -> ResponseContent
Add a new blank layout section above target
Sourcepub async fn layout_add_blank_below(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_blank_below( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, border: Option<Border>, ) -> ResponseContent
Add a new blank layout section below target
Sourcepub async fn layout_add_blank_left(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_blank_left( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, border: Option<Border>, ) -> ResponseContent
Add a new blank layout section to the left of target
Sourcepub async fn layout_add_blank_right(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_blank_right( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, border: Option<Border>, ) -> ResponseContent
Add a new blank layout section to the right of target
Sourcepub async fn layout_add_component_above(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
component: Discriminator,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_component_above( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, component: Discriminator, border: Option<Border>, ) -> ResponseContent
Add a new component layout section above target
Sourcepub async fn layout_add_component_below(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
component: Discriminator,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_component_below( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, component: Discriminator, border: Option<Border>, ) -> ResponseContent
Add a new component layout section below target
Sourcepub async fn layout_add_component_left(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
component: Discriminator,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_component_left( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, component: Discriminator, border: Option<Border>, ) -> ResponseContent
Add a new component layout section to the left of target
Sourcepub async fn layout_add_component_right(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
component: Discriminator,
border: Option<Border>,
) -> ResponseContent
pub async fn layout_add_component_right( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, component: Discriminator, border: Option<Border>, ) -> ResponseContent
Add a new component layout section to the right of target
Sourcepub async fn layout_add_bordered_above(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
component: Option<Discriminator>,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_above( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, component: Option<Discriminator>, border: Border, ) -> ResponseContent
Add a new bordered layout section above target
Sourcepub async fn layout_add_bordered_below(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
component: Option<Discriminator>,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_below( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, component: Option<Discriminator>, border: Border, ) -> ResponseContent
Add a new bordered layout section below target
Sourcepub async fn layout_add_bordered_left(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
component: Option<Discriminator>,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_left( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, component: Option<Discriminator>, border: Border, ) -> ResponseContent
Add a new bordered layout section to the left of target
Sourcepub async fn layout_add_bordered_right(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
component: Option<Discriminator>,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_right( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, component: Option<Discriminator>, border: Border, ) -> ResponseContent
Add a new bordered layout section to the right of target
Sourcepub async fn layout_add_unbordered_above(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
component: Option<Discriminator>,
) -> ResponseContent
pub async fn layout_add_unbordered_above( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, component: Option<Discriminator>, ) -> ResponseContent
Add a new unbordered layout section above target
Sourcepub async fn layout_add_unbordered_below(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
component: Option<Discriminator>,
) -> ResponseContent
pub async fn layout_add_unbordered_below( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, component: Option<Discriminator>, ) -> ResponseContent
Add a new unbordered layout section below target
Sourcepub async fn layout_add_unbordered_left(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
component: Option<Discriminator>,
) -> ResponseContent
pub async fn layout_add_unbordered_left( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, component: Option<Discriminator>, ) -> ResponseContent
Add a new unbordered layout section to the left of target
Sourcepub async fn layout_add_unbordered_right(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
component: Option<Discriminator>,
) -> ResponseContent
pub async fn layout_add_unbordered_right( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, component: Option<Discriminator>, ) -> ResponseContent
Add a new unbordered layout section to the right of target
Source§impl Client
impl Client
Sourcepub async fn layout_add_bordered_blank(
&self,
layout: Discriminator,
at: Vec<Direction>,
split: Direction,
constraint_1: Constraint,
constraint_2: Constraint,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_blank( &self, layout: Discriminator, at: Vec<Direction>, split: Direction, constraint_1: Constraint, constraint_2: Constraint, border: Border, ) -> ResponseContent
Add a new bordered blank layout section
Sourcepub async fn layout_add_unbordered_blank(
&self,
layout: Discriminator,
at: Vec<Direction>,
split: Direction,
constraint_1: Constraint,
constraint_2: Constraint,
) -> ResponseContent
pub async fn layout_add_unbordered_blank( &self, layout: Discriminator, at: Vec<Direction>, split: Direction, constraint_1: Constraint, constraint_2: Constraint, ) -> ResponseContent
Add a new unbordered blank layout section
Sourcepub async fn layout_add_bordered_component(
&self,
layout: Discriminator,
at: Vec<Direction>,
split: Direction,
constraint_1: Constraint,
constraint_2: Constraint,
component: Discriminator,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_component( &self, layout: Discriminator, at: Vec<Direction>, split: Direction, constraint_1: Constraint, constraint_2: Constraint, component: Discriminator, border: Border, ) -> ResponseContent
Add a new bordered component layout section
Sourcepub async fn layout_add_unbordered_component(
&self,
layout: Discriminator,
at: Vec<Direction>,
split: Direction,
constraint_1: Constraint,
constraint_2: Constraint,
component: Discriminator,
) -> ResponseContent
pub async fn layout_add_unbordered_component( &self, layout: Discriminator, at: Vec<Direction>, split: Direction, constraint_1: Constraint, constraint_2: Constraint, component: Discriminator, ) -> ResponseContent
Add a new unbordered component layout section
Source§impl Client
impl Client
Sourcepub async fn layout_add_bordered_blank_above(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_blank_above( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, border: Border, ) -> ResponseContent
Add a new bordered blank layout section above target
Sourcepub async fn layout_add_bordered_blank_below(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_blank_below( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, border: Border, ) -> ResponseContent
Add a new bordered blank layout section below target
Sourcepub async fn layout_add_bordered_blank_left(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_blank_left( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, border: Border, ) -> ResponseContent
Add a new bordered blank layout section to the left of target
Sourcepub async fn layout_add_bordered_blank_right(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_blank_right( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, border: Border, ) -> ResponseContent
Add a new bordered blank layout section to the right of target
Sourcepub async fn layout_add_bordered_component_above(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
component: Discriminator,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_component_above( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, component: Discriminator, border: Border, ) -> ResponseContent
Add a new bordered component layout section above target
Sourcepub async fn layout_add_bordered_component_below(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
component: Discriminator,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_component_below( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, component: Discriminator, border: Border, ) -> ResponseContent
Add a new bordered component layout section below target
Sourcepub async fn layout_add_bordered_component_left(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
component: Discriminator,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_component_left( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, component: Discriminator, border: Border, ) -> ResponseContent
Add a new bordered component layout section to the left of target
Sourcepub async fn layout_add_bordered_component_right(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
component: Discriminator,
border: Border,
) -> ResponseContent
pub async fn layout_add_bordered_component_right( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, component: Discriminator, border: Border, ) -> ResponseContent
Add a new bordered component layout section to the right of target
Sourcepub async fn layout_add_unbordered_blank_above(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
) -> ResponseContent
pub async fn layout_add_unbordered_blank_above( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, ) -> ResponseContent
Add a new unbordered blank layout section above target
Sourcepub async fn layout_add_unbordered_blank_below(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
) -> ResponseContent
pub async fn layout_add_unbordered_blank_below( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, ) -> ResponseContent
Add a new unbordered blank layout section below target
Sourcepub async fn layout_add_unbordered_blank_left(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
) -> ResponseContent
pub async fn layout_add_unbordered_blank_left( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, ) -> ResponseContent
Add a new unbordered blank layout section to the left of target
Sourcepub async fn layout_add_unbordered_blank_right(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
) -> ResponseContent
pub async fn layout_add_unbordered_blank_right( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, ) -> ResponseContent
Add a new unbordered blank layout section to the right of target
Sourcepub async fn layout_add_unbordered_component_above(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
component: Discriminator,
) -> ResponseContent
pub async fn layout_add_unbordered_component_above( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, component: Discriminator, ) -> ResponseContent
Add a new unbordered component layout section above target
Sourcepub async fn layout_add_unbordered_component_below(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_top: Constraint,
constraint_bottom: Constraint,
component: Discriminator,
) -> ResponseContent
pub async fn layout_add_unbordered_component_below( &self, layout: Discriminator, at: Vec<Direction>, constraint_top: Constraint, constraint_bottom: Constraint, component: Discriminator, ) -> ResponseContent
Add a new unbordered component layout section below target
Sourcepub async fn layout_add_unbordered_component_left(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
component: Discriminator,
) -> ResponseContent
pub async fn layout_add_unbordered_component_left( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, component: Discriminator, ) -> ResponseContent
Add a new unbordered component layout section to the left of target
Sourcepub async fn layout_add_unbordered_component_right(
&self,
layout: Discriminator,
at: Vec<Direction>,
constraint_left: Constraint,
constraint_right: Constraint,
component: Discriminator,
) -> ResponseContent
pub async fn layout_add_unbordered_component_right( &self, layout: Discriminator, at: Vec<Direction>, constraint_left: Constraint, constraint_right: Constraint, component: Discriminator, ) -> ResponseContent
Add a new unbordered component layout section to the right of target
Source§impl Client
impl Client
Sourcepub async fn layout_remove(
&self,
layout: Discriminator,
at: Vec<Direction>,
) -> ResponseContent
pub async fn layout_remove( &self, layout: Discriminator, at: Vec<Direction>, ) -> ResponseContent
Remove a layout section
Sourcepub async fn layout_set(
&self,
layout: Discriminator,
at: Vec<Direction>,
overwrite: Layout,
) -> ResponseContent
pub async fn layout_set( &self, layout: Discriminator, at: Vec<Direction>, overwrite: Layout, ) -> ResponseContent
Overwrite a layout section
Sourcepub async fn layout_set_root(
&self,
layout: Discriminator,
overwrite: Layout,
) -> ResponseContent
pub async fn layout_set_root( &self, layout: Discriminator, overwrite: Layout, ) -> ResponseContent
Overwrite the root layout section
Source§impl Client
impl Client
Sourcepub async fn enable_saver(&self, min_width: u32, min_height: u32)
pub async fn enable_saver(&self, min_width: u32, min_height: u32)
Enable screen saver with a specific dimension.
Sourcepub async fn disable_saver(&self)
pub async fn disable_saver(&self)
Disable screeen saver.
Sourcepub async fn saver_ison(&self) -> bool
pub async fn saver_ison(&self) -> bool
Returns true if the overlay is currently drawn.
Source§impl Client
impl Client
Sourcepub fn scroll(&self, discrim: Discriminator) -> ScrollComponent
pub fn scroll(&self, discrim: Discriminator) -> ScrollComponent
Returns a scroll component from a discrim of ccanvas-scroll