Struct Buffer

Source
pub struct Buffer { /* private fields */ }

Implementations§

Source§

impl Buffer

Source

pub fn new(code_data: Value) -> Buffer

Source

pub fn get_value(&self) -> &Value

Internal value, that represent type

Source

pub fn line_count(&self, neovim: &mut Neovim) -> Result<i64, CallError>

since: 1

Source

pub fn attach( &self, neovim: &mut Neovim, send_buffer: bool, opts: Vec<(Value, Value)>, ) -> Result<bool, CallError>

since: 4

Source

pub fn detach(&self, neovim: &mut Neovim) -> Result<bool, CallError>

since: 4

Source

pub fn get_lines( &self, neovim: &mut Neovim, start: i64, end: i64, strict_indexing: bool, ) -> Result<Vec<String>, CallError>

since: 1

Source

pub fn set_lines( &self, neovim: &mut Neovim, start: i64, end: i64, strict_indexing: bool, replacement: Vec<String>, ) -> Result<(), CallError>

since: 1

Source

pub fn get_offset( &self, neovim: &mut Neovim, index: i64, ) -> Result<i64, CallError>

since: 5

Source

pub fn get_var( &self, neovim: &mut Neovim, name: &str, ) -> Result<Value, CallError>

since: 1

Source

pub fn get_changedtick(&self, neovim: &mut Neovim) -> Result<i64, CallError>

since: 2

Source

pub fn get_keymap( &self, neovim: &mut Neovim, mode: &str, ) -> Result<Vec<Vec<(Value, Value)>>, CallError>

since: 3

Source

pub fn get_commands( &self, neovim: &mut Neovim, opts: Vec<(Value, Value)>, ) -> Result<Vec<(Value, Value)>, CallError>

since: 4

Source

pub fn set_var( &self, neovim: &mut Neovim, name: &str, value: Value, ) -> Result<(), CallError>

since: 1

Source

pub fn del_var(&self, neovim: &mut Neovim, name: &str) -> Result<(), CallError>

since: 1

Source

pub fn get_option( &self, neovim: &mut Neovim, name: &str, ) -> Result<Value, CallError>

since: 1

Source

pub fn set_option( &self, neovim: &mut Neovim, name: &str, value: Value, ) -> Result<(), CallError>

since: 1

Source

pub fn get_number(&self, neovim: &mut Neovim) -> Result<i64, CallError>

since: 1

Source

pub fn get_name(&self, neovim: &mut Neovim) -> Result<String, CallError>

since: 1

Source

pub fn set_name(&self, neovim: &mut Neovim, name: &str) -> Result<(), CallError>

since: 1

Source

pub fn is_loaded(&self, neovim: &mut Neovim) -> Result<bool, CallError>

since: 5

Source

pub fn is_valid(&self, neovim: &mut Neovim) -> Result<bool, CallError>

since: 1

Source

pub fn get_mark( &self, neovim: &mut Neovim, name: &str, ) -> Result<(i64, i64), CallError>

since: 1

Source

pub fn add_highlight( &self, neovim: &mut Neovim, ns_id: i64, hl_group: &str, line: i64, col_start: i64, col_end: i64, ) -> Result<i64, CallError>

since: 1

Source

pub fn clear_namespace( &self, neovim: &mut Neovim, ns_id: i64, line_start: i64, line_end: i64, ) -> Result<(), CallError>

since: 5

Source

pub fn clear_highlight( &self, neovim: &mut Neovim, ns_id: i64, line_start: i64, line_end: i64, ) -> Result<(), CallError>

since: 1

Source

pub fn set_virtual_text( &self, neovim: &mut Neovim, ns_id: i64, line: i64, chunks: Vec<Value>, opts: Vec<(Value, Value)>, ) -> Result<i64, CallError>

since: 5

Trait Implementations§

Source§

impl Clone for Buffer

Source§

fn clone(&self) -> Buffer

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Buffer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Buffer

Source§

fn eq(&self, other: &Buffer) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Buffer

Auto Trait Implementations§

§

impl Freeze for Buffer

§

impl RefUnwindSafe for Buffer

§

impl Send for Buffer

§

impl Sync for Buffer

§

impl Unpin for Buffer

§

impl UnwindSafe for Buffer

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.