pub struct CapabilityProfileBuilder { /* private fields */ }Expand description
Builder for custom terminal capability profiles.
Enables fine-grained control over capability configuration for testing and simulation purposes.
§Example
use ftui_core::terminal_capabilities::CapabilityProfileBuilder;
let profile = CapabilityProfileBuilder::new()
.colors_256(true)
.true_color(true)
.mouse_sgr(true)
.bracketed_paste(true)
.build();
assert!(profile.colors_256);
assert!(profile.true_color);Implementations§
Source§impl CapabilityProfileBuilder
impl CapabilityProfileBuilder
Sourcepub fn from_profile(profile: TerminalProfile) -> Self
pub fn from_profile(profile: TerminalProfile) -> Self
Start from an existing profile.
Sourcepub fn build(self) -> TerminalCapabilities
pub fn build(self) -> TerminalCapabilities
Build the final capability set.
Sourcepub const fn true_color(self, enabled: bool) -> Self
pub const fn true_color(self, enabled: bool) -> Self
Set true color (24-bit RGB) support.
Sourcepub const fn colors_256(self, enabled: bool) -> Self
pub const fn colors_256(self, enabled: bool) -> Self
Set 256-color palette support.
Sourcepub const fn sync_output(self, enabled: bool) -> Self
pub const fn sync_output(self, enabled: bool) -> Self
Set synchronized output (DEC mode 2026) support.
Sourcepub const fn osc8_hyperlinks(self, enabled: bool) -> Self
pub const fn osc8_hyperlinks(self, enabled: bool) -> Self
Set OSC 8 hyperlinks support.
Sourcepub const fn scroll_region(self, enabled: bool) -> Self
pub const fn scroll_region(self, enabled: bool) -> Self
Set scroll region (DECSTBM) support.
Sourcepub const fn kitty_keyboard(self, enabled: bool) -> Self
pub const fn kitty_keyboard(self, enabled: bool) -> Self
Set Kitty keyboard protocol support.
Sourcepub const fn focus_events(self, enabled: bool) -> Self
pub const fn focus_events(self, enabled: bool) -> Self
Set focus event reporting support.
Sourcepub const fn bracketed_paste(self, enabled: bool) -> Self
pub const fn bracketed_paste(self, enabled: bool) -> Self
Set bracketed paste mode support.
Sourcepub const fn osc52_clipboard(self, enabled: bool) -> Self
pub const fn osc52_clipboard(self, enabled: bool) -> Self
Set OSC 52 clipboard support.
Trait Implementations§
Source§impl Clone for CapabilityProfileBuilder
impl Clone for CapabilityProfileBuilder
Source§fn clone(&self) -> CapabilityProfileBuilder
fn clone(&self) -> CapabilityProfileBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CapabilityProfileBuilder
impl Debug for CapabilityProfileBuilder
Auto Trait Implementations§
impl Freeze for CapabilityProfileBuilder
impl RefUnwindSafe for CapabilityProfileBuilder
impl Send for CapabilityProfileBuilder
impl Sync for CapabilityProfileBuilder
impl Unpin for CapabilityProfileBuilder
impl UnwindSafe for CapabilityProfileBuilder
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