pub struct SetFontSizeCommandBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> SetFontSizeCommandBuilder<S>
impl<S: State> SetFontSizeCommandBuilder<S>
Sourcepub fn build(self) -> SetFontSizeCommandwhere
S: IsComplete,
pub fn build(self) -> SetFontSizeCommandwhere
S: IsComplete,
Finish building and return the requested object
Examples found in repository?
examples/test_font.rs (line 17)
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}Sourcepub fn size(self, value: f64) -> SetFontSizeCommandBuilder<SetSize<S>>where
S::Size: IsUnset,
pub fn size(self, value: f64) -> SetFontSizeCommandBuilder<SetSize<S>>where
S::Size: IsUnset,
Required.
Examples found in repository?
examples/test_font.rs (line 15)
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}Sourcepub fn all(self, value: bool) -> SetFontSizeCommandBuilder<SetAll<S>>where
S::All: IsUnset,
pub fn all(self, value: bool) -> SetFontSizeCommandBuilder<SetAll<S>>where
S::All: IsUnset,
Sourcepub fn maybe_all(
self,
value: Option<bool>,
) -> SetFontSizeCommandBuilder<SetAll<S>>where
S::All: IsUnset,
pub fn maybe_all(
self,
value: Option<bool>,
) -> SetFontSizeCommandBuilder<SetAll<S>>where
S::All: IsUnset,
Sourcepub fn increment_op(
self,
value: String,
) -> SetFontSizeCommandBuilder<SetIncrementOp<S>>where
S::IncrementOp: IsUnset,
pub fn increment_op(
self,
value: String,
) -> SetFontSizeCommandBuilder<SetIncrementOp<S>>where
S::IncrementOp: IsUnset,
Examples found in repository?
examples/test_font.rs (line 16)
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}Sourcepub fn maybe_increment_op(
self,
value: Option<String>,
) -> SetFontSizeCommandBuilder<SetIncrementOp<S>>where
S::IncrementOp: IsUnset,
pub fn maybe_increment_op(
self,
value: Option<String>,
) -> SetFontSizeCommandBuilder<SetIncrementOp<S>>where
S::IncrementOp: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for SetFontSizeCommandBuilder<S>
impl<S> RefUnwindSafe for SetFontSizeCommandBuilder<S>
impl<S> Send for SetFontSizeCommandBuilder<S>
impl<S> Sync for SetFontSizeCommandBuilder<S>
impl<S> Unpin for SetFontSizeCommandBuilder<S>
impl<S> UnwindSafe for SetFontSizeCommandBuilder<S>
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