pub struct SetFontSizeCommand { /* private fields */ }Implementations§
Source§impl SetFontSizeCommand
impl SetFontSizeCommand
Sourcepub fn builder() -> SetFontSizeCommandBuilder
pub fn builder() -> SetFontSizeCommandBuilder
Create an instance of SetFontSizeCommand using the builder syntax
Examples found in repository?
examples/test_font.rs (line 14)
4async fn main() -> Result<(), Box<dyn std::error::Error>> {
5 let mut kitty = Kitty::builder()
6 .socket_path("/run/user/1000/kitty-757336.sock")
7 .password("0pD4cLsKze84eCYOh7dIlvMFF87rgHEPSkngVpgbtYJ9hAzJ")
8 .connect()
9 .await?;
10
11 println!("Testing set-font-size increment command...");
12
13 // Try increment
14 let cmd = SetFontSizeCommand::builder()
15 .size(0.0)
16 .increment_op("+".to_string())
17 .build()
18 .to_message()?;
19
20 let result = kitty.execute(&cmd).await?;
21 println!("Increment result: ok={}, data={:?}, error={:?}", result.ok, result.data, result.error);
22
23 Ok(())
24}Source§impl SetFontSizeCommand
impl SetFontSizeCommand
Sourcepub fn to_message(self) -> Result<KittyMessage, CommandError>
pub fn to_message(self) -> Result<KittyMessage, CommandError>
Examples found in repository?
examples/test_font.rs (line 18)
4async fn main() -> Result<(), Box<dyn std::error::Error>> {
5 let mut kitty = Kitty::builder()
6 .socket_path("/run/user/1000/kitty-757336.sock")
7 .password("0pD4cLsKze84eCYOh7dIlvMFF87rgHEPSkngVpgbtYJ9hAzJ")
8 .connect()
9 .await?;
10
11 println!("Testing set-font-size increment command...");
12
13 // Try increment
14 let cmd = SetFontSizeCommand::builder()
15 .size(0.0)
16 .increment_op("+".to_string())
17 .build()
18 .to_message()?;
19
20 let result = kitty.execute(&cmd).await?;
21 println!("Increment result: ok={}, data={:?}, error={:?}", result.ok, result.data, result.error);
22
23 Ok(())
24}Trait Implementations§
Auto Trait Implementations§
impl Freeze for SetFontSizeCommand
impl RefUnwindSafe for SetFontSizeCommand
impl Send for SetFontSizeCommand
impl Sync for SetFontSizeCommand
impl Unpin for SetFontSizeCommand
impl UnwindSafe for SetFontSizeCommand
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