pub enum FifAction {
None,
CloseDialog,
CloseAll,
Searched {
matches: usize,
elapsed: Duration,
query: String,
},
OpenAt {
path: PathBuf,
line: usize,
col: usize,
},
Replaced {
files_changed: usize,
replacements: usize,
failures: usize,
query: String,
replacement: String,
},
}Expand description
Efecto solicitado al host. El módulo nunca toca el FS ni el resto del modelo de la app — devuelve el deseo, el host elige cómo lo aplica.
Variants§
None
CloseDialog
El host debería marcar state.dialog_open = false y dejar el
resto del state intacto (resultados visibles en la barra).
CloseAll
El host debería remover el state del modelo entero.
Searched
Tras un Submit que ejecutó search.
OpenAt
El host debería abrir path y posicionar el caret en (line, col).
El módulo NO se cierra automáticamente: el host decide si ocultar
el dialog tras abrir el match.
Replaced
Tras ReplaceAll: cuántos archivos tocados, cuántos matches
sustituidos, cuántos fallaron. El host debería refrescar buffers
abiertos (recargar de disco si no-dirty) y mostrar status.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FifAction
impl RefUnwindSafe for FifAction
impl Send for FifAction
impl Sync for FifAction
impl Unpin for FifAction
impl UnsafeUnpin for FifAction
impl UnwindSafe for FifAction
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.