pub struct CmdlineCompletionCache { /* private fields */ }Expand description
Lock-free completion cache
Uses ArcSwap for atomic snapshot replacement.
Implementations§
Source§impl CmdlineCompletionCache
impl CmdlineCompletionCache
Sourcepub fn store(&self, snapshot: CmdlineCompletionSnapshot)
pub fn store(&self, snapshot: CmdlineCompletionSnapshot)
Store a new snapshot
Sourcepub fn load(&self) -> Arc<CmdlineCompletionSnapshot>
pub fn load(&self) -> Arc<CmdlineCompletionSnapshot>
Load the current snapshot
Sourcepub fn update_selection(&self, new_index: usize)
pub fn update_selection(&self, new_index: usize)
Update selected index
Sourcepub fn select_next(&self)
pub fn select_next(&self)
Select next item (wraps around)
Sourcepub fn select_prev(&self)
pub fn select_prev(&self)
Select previous item (wraps around)
Trait Implementations§
Source§impl Debug for CmdlineCompletionCache
impl Debug for CmdlineCompletionCache
Auto Trait Implementations§
impl !Freeze for CmdlineCompletionCache
impl RefUnwindSafe for CmdlineCompletionCache
impl Send for CmdlineCompletionCache
impl Sync for CmdlineCompletionCache
impl Unpin for CmdlineCompletionCache
impl UnwindSafe for CmdlineCompletionCache
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