[−][src]Struct nvim_rs::exttypes::buffer::Buffer
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]
W: AsyncWrite + Send + Sync + Unpin + 'static,
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]
&'_ self,
send_buffer: bool,
opts: Vec<(Value, Value)>
) -> Result<bool, Box<CallError>>
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]
&'_ self,
start: i64,
end: i64,
strict_indexing: bool
) -> Result<Vec<String>, Box<CallError>>
since: 1
pub async fn set_lines<'_>(
&'_ self,
start: i64,
end: i64,
strict_indexing: bool,
replacement: Vec<String>
) -> Result<(), Box<CallError>>
[src]
&'_ self,
start: i64,
end: i64,
strict_indexing: bool,
replacement: Vec<String>
) -> Result<(), Box<CallError>>
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]
&'_ self,
name: &'_ str
) -> Result<Value, Box<CallError>>
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]
&'_ self,
mode: &'_ str
) -> Result<Vec<Vec<(Value, Value)>>, Box<CallError>>
since: 3
pub async fn set_keymap<'_, '_, '_, '_>(
&'_ self,
mode: &'_ str,
lhs: &'_ str,
rhs: &'_ str,
opts: Vec<(Value, Value)>
) -> Result<(), Box<CallError>>
[src]
&'_ self,
mode: &'_ str,
lhs: &'_ str,
rhs: &'_ str,
opts: Vec<(Value, Value)>
) -> Result<(), Box<CallError>>
since: 6
pub async fn del_keymap<'_, '_, '_>(
&'_ self,
mode: &'_ str,
lhs: &'_ str
) -> Result<(), Box<CallError>>
[src]
&'_ self,
mode: &'_ str,
lhs: &'_ str
) -> Result<(), Box<CallError>>
since: 6
pub async fn get_commands<'_>(
&'_ self,
opts: Vec<(Value, Value)>
) -> Result<Vec<(Value, Value)>, Box<CallError>>
[src]
&'_ self,
opts: Vec<(Value, Value)>
) -> Result<Vec<(Value, Value)>, Box<CallError>>
since: 4
pub async fn set_var<'_, '_>(
&'_ self,
name: &'_ str,
value: Value
) -> Result<(), Box<CallError>>
[src]
&'_ self,
name: &'_ str,
value: Value
) -> Result<(), Box<CallError>>
since: 1
pub async fn del_var<'_, '_>(
&'_ self,
name: &'_ str
) -> Result<(), Box<CallError>>
[src]
&'_ self,
name: &'_ str
) -> Result<(), Box<CallError>>
since: 1
pub async fn get_option<'_, '_>(
&'_ self,
name: &'_ str
) -> Result<Value, Box<CallError>>
[src]
&'_ self,
name: &'_ str
) -> Result<Value, Box<CallError>>
since: 1
pub async fn set_option<'_, '_>(
&'_ self,
name: &'_ str,
value: Value
) -> Result<(), Box<CallError>>
[src]
&'_ self,
name: &'_ str,
value: Value
) -> Result<(), Box<CallError>>
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]
&'_ self,
name: &'_ str
) -> Result<(), Box<CallError>>
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]
&'_ self,
name: &'_ str
) -> Result<(i64, i64), Box<CallError>>
since: 1
pub async fn get_extmark_by_id<'_>(
&'_ self,
ns_id: i64,
id: i64
) -> Result<Vec<i64>, Box<CallError>>
[src]
&'_ self,
ns_id: i64,
id: i64
) -> Result<Vec<i64>, Box<CallError>>
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]
&'_ self,
ns_id: i64,
start: Value,
end: Value,
opts: Vec<(Value, Value)>
) -> Result<Vec<Value>, Box<CallError>>
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]
&'_ self,
ns_id: i64,
id: i64,
line: i64,
col: i64,
opts: Vec<(Value, Value)>
) -> Result<i64, Box<CallError>>
since: 7
pub async fn del_extmark<'_>(
&'_ self,
ns_id: i64,
id: i64
) -> Result<bool, Box<CallError>>
[src]
&'_ self,
ns_id: i64,
id: i64
) -> Result<bool, Box<CallError>>
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]
&'_ self,
ns_id: i64,
hl_group: &'_ str,
line: i64,
col_start: i64,
col_end: i64
) -> Result<i64, Box<CallError>>
since: 1
pub async fn clear_namespace<'_>(
&'_ self,
ns_id: i64,
line_start: i64,
line_end: i64
) -> Result<(), Box<CallError>>
[src]
&'_ self,
ns_id: i64,
line_start: i64,
line_end: i64
) -> Result<(), Box<CallError>>
since: 5
pub async fn clear_highlight<'_>(
&'_ self,
ns_id: i64,
line_start: i64,
line_end: i64
) -> Result<(), Box<CallError>>
[src]
&'_ self,
ns_id: i64,
line_start: i64,
line_end: i64
) -> Result<(), Box<CallError>>
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]
&'_ self,
ns_id: i64,
line: i64,
chunks: Vec<Value>,
opts: Vec<(Value, Value)>
) -> Result<i64, Box<CallError>>
since: 5
pub async fn get_virtual_text<'_>(
&'_ self,
lnum: i64
) -> Result<Vec<Value>, Box<CallError>>
[src]
&'_ self,
lnum: i64
) -> Result<Vec<Value>, Box<CallError>>
since: 7
Trait Implementations
impl<W: Clone> Clone for Buffer<W> where
W: AsyncWrite + Send + Sync + Unpin + 'static,
[src]
W: AsyncWrite + Send + Sync + Unpin + 'static,
impl<'_, W> IntoVal<Value> for &'_ Buffer<W> where
W: AsyncWrite + Send + Sync + Unpin + 'static,
[src]
W: AsyncWrite + Send + Sync + Unpin + 'static,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,