pub struct ContextManager { /* private fields */ }Implementations§
Source§impl ContextManager
impl ContextManager
pub fn new() -> Self
pub fn with_generator( generator_fn: impl Fn(&str, &str) -> Result<String, String> + Send + Sync + 'static, ) -> Self
Sourcepub fn get_error(&self, name: &str) -> Option<&str>
pub fn get_error(&self, name: &str) -> Option<&str>
Get the last error for a window, if generation failed.
Sourcepub fn is_loading(&self, name: &str) -> bool
pub fn is_loading(&self, name: &str) -> bool
Whether a context request is currently running for this window.
Sourcepub fn tick(
&mut self,
windows: &[WindowInfo],
states: &HashMap<u32, WindowState>,
selected: usize,
pane_id_for: &impl Fn(u32) -> Option<String>,
cwd_for: &impl Fn(u32) -> Option<String>,
)
pub fn tick( &mut self, windows: &[WindowInfo], states: &HashMap<u32, WindowState>, selected: usize, pane_id_for: &impl Fn(u32) -> Option<String>, cwd_for: &impl Fn(u32) -> Option<String>, )
Run one tick of context orchestration.
- Drains completed results from background threads
- Invalidates cache on state transitions (Working → settled)
- Requests context for the selected window (lazy — only when settled)
- On selection change: refreshes old session (if settled), requests new session
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContextManager
impl !RefUnwindSafe for ContextManager
impl Send for ContextManager
impl !Sync for ContextManager
impl Unpin for ContextManager
impl UnsafeUnpin for ContextManager
impl !UnwindSafe for ContextManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more