pub struct AppState {
pub mode: AppMode,
pub config: ResolvedConfig,
pub candidates: Vec<Candidate>,
pub filtered: Vec<CandidateId>,
pub selection: usize,
pub query: String,
pub preview: PreviewState,
pub status: StatusLine,
pub pending_tasks: PendingTasks,
pub show_help: bool,
}Fields§
§mode: AppMode§config: ResolvedConfig§candidates: Vec<Candidate>§filtered: Vec<CandidateId>§selection: usize§query: String§preview: PreviewState§status: StatusLine§pending_tasks: PendingTasks§show_help: boolImplementations§
Source§impl AppState
impl AppState
pub fn new(config: ResolvedConfig) -> Self
pub fn replace_candidates(&mut self, candidates: Vec<Candidate>)
pub fn apply_query(&mut self, query: impl Into<String>)
pub fn move_selection(&mut self, delta: isize)
pub fn selected_candidate(&self) -> Option<&Candidate>
pub fn request_preview(&mut self) -> Option<AppCommand>
pub fn handle_intent(&mut self, intent: UserIntent) -> Option<AppCommand>
pub fn apply_preview_result( &mut self, generation: u64, key: &PreviewKey, result: Result<PreviewContent, String>, )
Trait Implementations§
impl StructuralPartialEq for AppState
Auto Trait Implementations§
impl Freeze for AppState
impl RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl UnwindSafe for AppState
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