pub struct FocusConfig {
pub focus_patterns: Vec<String>,
pub context_depth: usize,
}Expand description
Configuration for focus view rendering
Fields§
§focus_patterns: Vec<String>Patterns to match for focused (expanded) tasks Supports prefix matching (e.g., “6.3.2” matches “6.3.2.1”, “6.3.2.2”)
context_depth: usizeDepth to show for non-focused tasks (0 = hide, 1 = top-level only)
Implementations§
Source§impl FocusConfig
impl FocusConfig
Sourcepub fn new(patterns: Vec<String>, context_depth: usize) -> Self
pub fn new(patterns: Vec<String>, context_depth: usize) -> Self
Create a new focus configuration
Sourcepub fn matches_focus(&self, task_id: &str, task_name: &str) -> bool
pub fn matches_focus(&self, task_id: &str, task_name: &str) -> bool
Check if a task ID matches any focus pattern
Sourcepub fn get_visibility(
&self,
task_id: &str,
task_name: &str,
depth: usize,
is_ancestor_of_focused: bool,
is_descendant_of_focused: bool,
) -> TaskVisibility
pub fn get_visibility( &self, task_id: &str, task_name: &str, depth: usize, is_ancestor_of_focused: bool, is_descendant_of_focused: bool, ) -> TaskVisibility
Determine visibility of a task based on focus configuration
Trait Implementations§
Source§impl Clone for FocusConfig
impl Clone for FocusConfig
Source§fn clone(&self) -> FocusConfig
fn clone(&self) -> FocusConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FocusConfig
impl Debug for FocusConfig
Source§impl Default for FocusConfig
impl Default for FocusConfig
Source§fn default() -> FocusConfig
fn default() -> FocusConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FocusConfig
impl RefUnwindSafe for FocusConfig
impl Send for FocusConfig
impl Sync for FocusConfig
impl Unpin for FocusConfig
impl UnsafeUnpin for FocusConfig
impl UnwindSafe for FocusConfig
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