Struct Buffer

Source
pub struct Buffer<'a, B: CoreBuffer> {
    pub core: Core<B>,
    pub search: Vec<char>,
    pub snippet: BTreeMap<String, String>,
    pub yank: Yank,
    pub lsp: Option<LSPClient>,
    pub tabnine: Option<TabNineClient>,
    /* private fields */
}

Fields§

§core: Core<B>§search: Vec<char>§snippet: BTreeMap<String, String>§yank: Yank§lsp: Option<LSPClient>§tabnine: Option<TabNineClient>

Implementations§

Source§

impl<'a, B: CoreBuffer> Buffer<'a, B>

Source

pub fn new( syntax_parent: &'a SyntaxParent, config: &'a ConfigWithDefault, ) -> Self

Source

pub fn path(&self) -> Option<&Path>

Source

pub fn storage(&self) -> Option<&dyn Storage<B>>

Source

pub fn get_config<A: Key>(&self) -> Option<&'a A::Value>

Source

pub fn extend_cache_duration(&mut self, duration: Duration)

Source

pub fn indent_width(&self) -> usize

Source

pub fn hard_tab(&self) -> bool

Source

pub fn restart_completer(&mut self)

Source

pub fn set_language(&mut self)

Source

pub fn indent(&mut self)

Source

pub fn set_storage<T: Storage<B> + 'static>(&mut self, storage: T)

Source

pub fn open<S: Storage<B> + 'static>(&mut self, storage: S)

Source

pub fn save(&mut self, is_optimize: bool) -> bool

Source

pub fn show_cursor(&mut self)

Source

pub fn show_cursor_middle(&mut self)

Source

pub fn scroll_up(&mut self)

Source

pub fn scroll_down(&mut self)

Source

pub fn format(&mut self) -> Result<(), Cow<'static, str>>

Source

pub fn compile(&mut self, is_optimize: bool)

Source

pub fn last_compile_success(&self) -> Option<bool>

Source

pub fn compiler_message_on_cursor(&self) -> Option<&str>

Source

pub fn poll_compile_message(&mut self)

Source

pub async fn wait_compile_message(&mut self)

Source

pub fn is_compiling(&self) -> bool

Source

pub fn draw(&mut self, view: TermView<'_>) -> Option<Cursor>

Source

pub fn draw_with_selected<R: RangeBounds<Cursor>>( &mut self, view: TermView<'_>, selected: Option<R>, ) -> Option<Cursor>

Auto Trait Implementations§

§

impl<'a, B> !Freeze for Buffer<'a, B>

§

impl<'a, B> !RefUnwindSafe for Buffer<'a, B>

§

impl<'a, B> !Send for Buffer<'a, B>

§

impl<'a, B> !Sync for Buffer<'a, B>

§

impl<'a, B> Unpin for Buffer<'a, B>
where B: Unpin,

§

impl<'a, B> !UnwindSafe for Buffer<'a, B>

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> UnsafeAny for T
where T: Any,