pub struct Editor {
pub fs: Arc<dyn Fs + Send + Sync>,
pub registers: HashMap<char, Vec<String>, IndigoBuildHasher>,
pub mode: Mode,
pub count: Option<NonZeroUsize>,
pub pending_keys: Vec<Key>,
pub pwd: Option<Utf8PathBuf>,
pub message: Option<Result<String, String>>,
/* private fields */
}Fields§
§fs: Arc<dyn Fs + Send + Sync>§registers: HashMap<char, Vec<String>, IndigoBuildHasher>§mode: Mode§count: Option<NonZeroUsize>§pending_keys: Vec<Key>§pwd: Option<Utf8PathBuf>§message: Option<Result<String, String>>Implementations§
Source§impl Editor
impl Editor
pub fn new() -> Self
pub fn get_buffer(&self, buffer_key: BufferKey) -> Option<&Buffer>
pub fn get_buffer_mut(&mut self, buffer_key: BufferKey) -> Option<&mut Buffer>
pub fn focused_buffer(&self) -> &Buffer
pub fn focused_buffer_mut(&mut self) -> &mut Buffer
pub fn buffers(&self) -> impl Iterator<Item = (BufferKey, &Buffer)>
pub fn buffers_mut(&mut self) -> impl Iterator<Item = (BufferKey, &mut Buffer)>
pub fn focus_window(&mut self, window_key: WindowKey) -> bool
pub fn get_window(&self, window_key: WindowKey) -> Option<Window<'_>>
pub fn get_window_mut(&mut self, window_key: WindowKey) -> Option<WindowMut<'_>>
pub fn focused_window(&self) -> Window<'_>
pub fn focused_window_mut(&mut self) -> WindowMut<'_>
pub fn exit_code(&self) -> Option<ExitCode>
Sourcepub fn exit(&mut self, exit_code: u8)
pub fn exit(&mut self, exit_code: u8)
Doesn’t actually terminate the process, just records the desired exit code.
pub fn handle_event(&mut self, event: Event) -> Result<bool>
pub fn handle_action(&mut self, action: &Action)
pub fn assert_invariants(&self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Editor
impl !UnwindSafe for Editor
impl Freeze for Editor
impl Send for Editor
impl Sync for Editor
impl Unpin for Editor
impl UnsafeUnpin for Editor
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