pub struct Buffer<W>{ /* private fields */ }
Expand description
A struct representing a neovim buffer. It is specific to a
Neovim
instance, and calling a method on it will
always use this instance.
Implementations§
source§impl<W> Buffer<W>
impl<W> Buffer<W>
pub fn new(code_data: Value, neovim: Neovim<W>) -> Buffer<W>
sourcepub async fn attach(
&self,
send_buffer: bool,
opts: Vec<(Value, Value)>
) -> Result<bool, Box<CallError>>
pub async fn attach( &self, send_buffer: bool, opts: Vec<(Value, Value)> ) -> Result<bool, Box<CallError>>
since: 4
sourcepub async fn get_lines(
&self,
start: i64,
end: i64,
strict_indexing: bool
) -> Result<Vec<String>, Box<CallError>>
pub async fn get_lines( &self, start: i64, end: i64, strict_indexing: bool ) -> Result<Vec<String>, Box<CallError>>
since: 1
sourcepub async fn set_lines(
&self,
start: i64,
end: i64,
strict_indexing: bool,
replacement: Vec<String>
) -> Result<(), Box<CallError>>
pub async fn set_lines( &self, start: i64, end: i64, strict_indexing: bool, replacement: Vec<String> ) -> Result<(), Box<CallError>>
since: 1
sourcepub async fn set_text(
&self,
start_row: i64,
start_col: i64,
end_row: i64,
end_col: i64,
replacement: Vec<String>
) -> Result<(), Box<CallError>>
pub async fn set_text( &self, start_row: i64, start_col: i64, end_row: i64, end_col: i64, replacement: Vec<String> ) -> Result<(), Box<CallError>>
since: 7
sourcepub async fn get_text(
&self,
start_row: i64,
start_col: i64,
end_row: i64,
end_col: i64,
opts: Vec<(Value, Value)>
) -> Result<Vec<String>, Box<CallError>>
pub async fn get_text( &self, start_row: i64, start_col: i64, end_row: i64, end_col: i64, opts: Vec<(Value, Value)> ) -> Result<Vec<String>, Box<CallError>>
since: 9
sourcepub async fn get_keymap(
&self,
mode: &str
) -> Result<Vec<Vec<(Value, Value)>>, Box<CallError>>
pub async fn get_keymap( &self, mode: &str ) -> Result<Vec<Vec<(Value, Value)>>, Box<CallError>>
since: 3
sourcepub async fn set_keymap(
&self,
mode: &str,
lhs: &str,
rhs: &str,
opts: Vec<(Value, Value)>
) -> Result<(), Box<CallError>>
pub async fn set_keymap( &self, mode: &str, lhs: &str, rhs: &str, opts: Vec<(Value, Value)> ) -> Result<(), Box<CallError>>
since: 6
sourcepub async fn set_mark(
&self,
name: &str,
line: i64,
col: i64,
opts: Vec<(Value, Value)>
) -> Result<bool, Box<CallError>>
pub async fn set_mark( &self, name: &str, line: i64, col: i64, opts: Vec<(Value, Value)> ) -> Result<bool, Box<CallError>>
since: 8
sourcepub async fn create_user_command(
&self,
name: &str,
command: Value,
opts: Vec<(Value, Value)>
) -> Result<(), Box<CallError>>
pub async fn create_user_command( &self, name: &str, command: Value, opts: Vec<(Value, Value)> ) -> Result<(), Box<CallError>>
since: 9
sourcepub async fn get_commands(
&self,
opts: Vec<(Value, Value)>
) -> Result<Vec<(Value, Value)>, Box<CallError>>
pub async fn get_commands( &self, opts: Vec<(Value, Value)> ) -> Result<Vec<(Value, Value)>, Box<CallError>>
since: 4
sourcepub async fn clear_highlight(
&self,
ns_id: i64,
line_start: i64,
line_end: i64
) -> Result<(), Box<CallError>>
pub async fn clear_highlight( &self, ns_id: i64, line_start: i64, line_end: i64 ) -> Result<(), Box<CallError>>
since: 1
sourcepub async fn set_virtual_text(
&self,
src_id: i64,
line: i64,
chunks: Vec<Value>,
opts: Vec<(Value, Value)>
) -> Result<i64, Box<CallError>>
pub async fn set_virtual_text( &self, src_id: i64, line: i64, chunks: Vec<Value>, opts: Vec<(Value, Value)> ) -> Result<i64, Box<CallError>>
since: 5
sourcepub async fn set_option(
&self,
name: &str,
value: Value
) -> Result<(), Box<CallError>>
pub async fn set_option( &self, name: &str, value: Value ) -> Result<(), Box<CallError>>
since: 1
sourcepub async fn get_extmark_by_id(
&self,
ns_id: i64,
id: i64,
opts: Vec<(Value, Value)>
) -> Result<Vec<i64>, Box<CallError>>
pub async fn get_extmark_by_id( &self, ns_id: i64, id: i64, opts: Vec<(Value, Value)> ) -> Result<Vec<i64>, Box<CallError>>
since: 7
sourcepub async fn get_extmarks(
&self,
ns_id: i64,
start: Value,
end: Value,
opts: Vec<(Value, Value)>
) -> Result<Vec<Value>, Box<CallError>>
pub async fn get_extmarks( &self, ns_id: i64, start: Value, end: Value, opts: Vec<(Value, Value)> ) -> Result<Vec<Value>, Box<CallError>>
since: 7
sourcepub async fn set_extmark(
&self,
ns_id: i64,
line: i64,
col: i64,
opts: Vec<(Value, Value)>
) -> Result<i64, Box<CallError>>
pub async fn set_extmark( &self, ns_id: i64, line: i64, col: i64, opts: Vec<(Value, Value)> ) -> Result<i64, Box<CallError>>
since: 7
sourcepub async fn del_extmark(
&self,
ns_id: i64,
id: i64
) -> Result<bool, Box<CallError>>
pub async fn del_extmark( &self, ns_id: i64, id: i64 ) -> Result<bool, Box<CallError>>
since: 7
Trait Implementations§
source§impl<W> PartialEq for Buffer<W>
impl<W> PartialEq for Buffer<W>
impl<W> Eq for Buffer<W>
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more