Editor

Struct Editor 

Source
pub struct Editor<I: Iterator<Item = Result<InputSeq>>, W: Write> { /* private fields */ }

Implementations§

Source§

impl<I, W> Editor<I, W>
where I: Iterator<Item = Result<InputSeq>>, W: Write,

Source

pub fn new( input: I, output: W, window_size: Option<(usize, usize)>, ) -> Result<Editor<I, W>>

Source

pub fn with_lines<S: AsRef<str>, L: Iterator<Item = S>>( lines: L, input: I, output: W, window_size: Option<(usize, usize)>, ) -> Result<Editor<I, W>>

Source

pub fn open<P: AsRef<Path>>( input: I, output: W, window_size: Option<(usize, usize)>, paths: &[P], ) -> Result<Editor<I, W>>

Source

pub fn buf(&self) -> &TextBuffer

Source

pub fn first_paint(&mut self) -> Result<Edit<'_, I, W>>

Source

pub fn edit(&mut self) -> Result<()>

Source

pub fn lines(&self) -> Lines<'_>

Source

pub fn screen(&self) -> &Screen<W>

Source

pub fn lang(&self) -> Language

Source

pub fn set_lang(&mut self, lang: Language)

Auto Trait Implementations§

§

impl<I, W> Freeze for Editor<I, W>
where I: Freeze, W: Freeze,

§

impl<I, W> RefUnwindSafe for Editor<I, W>

§

impl<I, W> Send for Editor<I, W>
where I: Send, W: Send,

§

impl<I, W> Sync for Editor<I, W>
where I: Sync, W: Sync,

§

impl<I, W> Unpin for Editor<I, W>
where I: Unpin, W: Unpin,

§

impl<I, W> UnwindSafe for Editor<I, W>
where I: UnwindSafe, W: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.