Skip to main content

WindowView

Struct WindowView 

Source
pub struct WindowView<'a, W: Wrap> { /* private fields */ }

Implementations§

Source§

impl<'a, W: WrapRef> WindowView<'a, W>

Source

pub fn new( buffer: W::WrapRef<'a, Buffer>, state: W::WrapRef<'a, WindowState>, ) -> Self

Source

pub fn height(&self) -> u16

Source

pub fn vertical_scroll(&self) -> usize

Source

pub fn buffer(&self) -> &Buffer

Source

pub fn selection(&self) -> Selection<'_>

Source

pub fn assert_invariants(&self) -> Result<()>

Source§

impl<W: WrapMut> WindowView<'_, W>

Source

pub fn set_height(&mut self, height: u16)

Source

pub fn scroll_to_line(&mut self, line: usize)

Source

pub fn scroll_to_selection(&mut self)

Source

pub fn scroll_center_selection(&mut self)

Source

pub fn buffer_mut(&mut self) -> &mut Buffer

Source

pub fn selection_move(&mut self) -> SelectionMove<'_>

Source

pub fn selection_edit(&mut self) -> SelectionEdit<'_>

Source

pub fn undo(&mut self) -> Result<bool>

Source

pub fn redo(&mut self) -> Result<bool>

Auto Trait Implementations§

§

impl<'a, W> Freeze for WindowView<'a, W>
where <W as Wrap>::Wrap<'a, WindowState>: Freeze, <W as Wrap>::Wrap<'a, Buffer>: Freeze,

§

impl<'a, W> RefUnwindSafe for WindowView<'a, W>
where <W as Wrap>::Wrap<'a, WindowState>: RefUnwindSafe, <W as Wrap>::Wrap<'a, Buffer>: RefUnwindSafe,

§

impl<'a, W> Send for WindowView<'a, W>
where <W as Wrap>::Wrap<'a, WindowState>: Send, <W as Wrap>::Wrap<'a, Buffer>: Send,

§

impl<'a, W> Sync for WindowView<'a, W>
where <W as Wrap>::Wrap<'a, WindowState>: Sync, <W as Wrap>::Wrap<'a, Buffer>: Sync,

§

impl<'a, W> Unpin for WindowView<'a, W>
where <W as Wrap>::Wrap<'a, WindowState>: Unpin, <W as Wrap>::Wrap<'a, Buffer>: Unpin,

§

impl<'a, W> UnsafeUnpin for WindowView<'a, W>
where <W as Wrap>::Wrap<'a, WindowState>: UnsafeUnpin, <W as Wrap>::Wrap<'a, Buffer>: UnsafeUnpin,

§

impl<'a, W> UnwindSafe for WindowView<'a, W>
where <W as Wrap>::Wrap<'a, WindowState>: UnwindSafe, <W as Wrap>::Wrap<'a, Buffer>: 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<I> FromItem<I> for I

Source§

fn from_item(item: I) -> I

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = !

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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more