[][src]Struct nvim_rs::exttypes::buffer::Buffer

pub struct Buffer<W> where
    W: AsyncWrite + Send + Sync + Unpin + 'static, 
{ /* fields omitted */ }

A struct representing a neovim buffer. It is specific to a Neovim instance, and calling a method on it will always use this instance.

Methods

impl<W> Buffer<W> where
    W: AsyncWrite + Send + Sync + Unpin + 'static, 
[src]

pub fn new(code_data: Value, neovim: Neovim<W>) -> Buffer<W>[src]

pub fn get_value(&self) -> &Value[src]

Internal value, that represent type

pub async fn line_count<'_>(&'_ self) -> Result<i64, Box<CallError>>[src]

since: 1

pub async fn attach<'_>(
    &'_ self,
    send_buffer: bool,
    opts: Vec<(Value, Value)>
) -> Result<bool, Box<CallError>>
[src]

since: 4

pub async fn detach<'_>(&'_ self) -> Result<bool, Box<CallError>>[src]

since: 4

pub async fn get_lines<'_>(
    &'_ self,
    start: i64,
    end: i64,
    strict_indexing: bool
) -> Result<Vec<String>, Box<CallError>>
[src]

since: 1

pub async fn set_lines<'_>(
    &'_ self,
    start: i64,
    end: i64,
    strict_indexing: bool,
    replacement: Vec<String>
) -> Result<(), Box<CallError>>
[src]

since: 1

pub async fn get_offset<'_>(&'_ self, index: i64) -> Result<i64, Box<CallError>>[src]

since: 5

pub async fn get_var<'_, '_>(
    &'_ self,
    name: &'_ str
) -> Result<Value, Box<CallError>>
[src]

since: 1

pub async fn get_changedtick<'_>(&'_ self) -> Result<i64, Box<CallError>>[src]

since: 2

pub async fn get_keymap<'_, '_>(
    &'_ self,
    mode: &'_ str
) -> Result<Vec<Vec<(Value, Value)>>, Box<CallError>>
[src]

since: 3

pub async fn set_keymap<'_, '_, '_, '_>(
    &'_ self,
    mode: &'_ str,
    lhs: &'_ str,
    rhs: &'_ str,
    opts: Vec<(Value, Value)>
) -> Result<(), Box<CallError>>
[src]

since: 6

pub async fn del_keymap<'_, '_, '_>(
    &'_ self,
    mode: &'_ str,
    lhs: &'_ str
) -> Result<(), Box<CallError>>
[src]

since: 6

pub async fn get_commands<'_>(
    &'_ self,
    opts: Vec<(Value, Value)>
) -> Result<Vec<(Value, Value)>, Box<CallError>>
[src]

since: 4

pub async fn set_var<'_, '_>(
    &'_ self,
    name: &'_ str,
    value: Value
) -> Result<(), Box<CallError>>
[src]

since: 1

pub async fn del_var<'_, '_>(
    &'_ self,
    name: &'_ str
) -> Result<(), Box<CallError>>
[src]

since: 1

pub async fn get_option<'_, '_>(
    &'_ self,
    name: &'_ str
) -> Result<Value, Box<CallError>>
[src]

since: 1

pub async fn set_option<'_, '_>(
    &'_ self,
    name: &'_ str,
    value: Value
) -> Result<(), Box<CallError>>
[src]

since: 1

pub async fn get_number<'_>(&'_ self) -> Result<i64, Box<CallError>>[src]

since: 1

pub async fn get_name<'_>(&'_ self) -> Result<String, Box<CallError>>[src]

since: 1

pub async fn set_name<'_, '_>(
    &'_ self,
    name: &'_ str
) -> Result<(), Box<CallError>>
[src]

since: 1

pub async fn is_loaded<'_>(&'_ self) -> Result<bool, Box<CallError>>[src]

since: 5

pub async fn is_valid<'_>(&'_ self) -> Result<bool, Box<CallError>>[src]

since: 1

pub async fn get_mark<'_, '_>(
    &'_ self,
    name: &'_ str
) -> Result<(i64, i64), Box<CallError>>
[src]

since: 1

pub async fn get_extmark_by_id<'_>(
    &'_ self,
    ns_id: i64,
    id: i64
) -> Result<Vec<i64>, Box<CallError>>
[src]

since: 7

pub async fn get_extmarks<'_>(
    &'_ self,
    ns_id: i64,
    start: Value,
    end: Value,
    opts: Vec<(Value, Value)>
) -> Result<Vec<Value>, Box<CallError>>
[src]

since: 7

pub async fn set_extmark<'_>(
    &'_ self,
    ns_id: i64,
    id: i64,
    line: i64,
    col: i64,
    opts: Vec<(Value, Value)>
) -> Result<i64, Box<CallError>>
[src]

since: 7

pub async fn del_extmark<'_>(
    &'_ self,
    ns_id: i64,
    id: i64
) -> Result<bool, Box<CallError>>
[src]

since: 7

pub async fn add_highlight<'_, '_>(
    &'_ self,
    ns_id: i64,
    hl_group: &'_ str,
    line: i64,
    col_start: i64,
    col_end: i64
) -> Result<i64, Box<CallError>>
[src]

since: 1

pub async fn clear_namespace<'_>(
    &'_ self,
    ns_id: i64,
    line_start: i64,
    line_end: i64
) -> Result<(), Box<CallError>>
[src]

since: 5

pub async fn clear_highlight<'_>(
    &'_ self,
    ns_id: i64,
    line_start: i64,
    line_end: i64
) -> Result<(), Box<CallError>>
[src]

since: 1

pub async fn set_virtual_text<'_>(
    &'_ self,
    ns_id: i64,
    line: i64,
    chunks: Vec<Value>,
    opts: Vec<(Value, Value)>
) -> Result<i64, Box<CallError>>
[src]

since: 5

pub async fn get_virtual_text<'_>(
    &'_ self,
    lnum: i64
) -> Result<Vec<Value>, Box<CallError>>
[src]

since: 7

Trait Implementations

impl<W: Clone> Clone for Buffer<W> where
    W: AsyncWrite + Send + Sync + Unpin + 'static, 
[src]

impl<'_, W> IntoVal<Value> for &'_ Buffer<W> where
    W: AsyncWrite + Send + Sync + Unpin + 'static, 
[src]

Auto Trait Implementations

impl<W> !RefUnwindSafe for Buffer<W>

impl<W> Send for Buffer<W>

impl<W> Sync for Buffer<W>

impl<W> Unpin for Buffer<W>

impl<W> !UnwindSafe for Buffer<W>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.