pub enum Choice {
Buffer(BufferId),
Command(String),
OpenFile(PathBuf),
Location {
path: PathBuf,
line: u32,
},
}Expand description
What accepting a row MEANS.
Closed on purpose. Adding a source is adding a variant, which fails the
interpreter to compile until the accept is handled — the same seal
Negai uses.
Variants§
Buffer(BufferId)
Switch to this buffer.
Command(String)
Run this command by name.
OpenFile(PathBuf)
Open path at its start — a file, with no particular line.
Location
Open path and put the cursor on line (0-based).
The buffer may not be open yet, which is exactly why this is a PATH
and not a BufferId: a grep hit names a place in the project, not a
place in the editor’s current state.
Trait Implementations§
impl Eq for Choice
impl StructuralPartialEq for Choice
Auto Trait Implementations§
impl Freeze for Choice
impl RefUnwindSafe for Choice
impl Send for Choice
impl Sync for Choice
impl Unpin for Choice
impl UnsafeUnpin for Choice
impl UnwindSafe for Choice
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