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) -> Option<String> + Send + Sync + 'static, ) -> Self
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>,
)
pub fn tick( &mut self, windows: &[WindowInfo], states: &HashMap<u32, WindowState>, selected: usize, pane_id_for: &impl Fn(u32) -> Option<String>, )
Run one tick of context orchestration.
- Prefetches context for all non-Fresh sessions
- Drains completed results from background threads
- On selection change: refreshes old session (if active), requests new session (if active)
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