[][src]Struct xrl::Client

pub struct Client(pub Client);

A client to send notifications and request to xi-core.

Implementations

impl Client[src]

pub fn notify(
    &self,
    method: &str,
    params: Value
) -> impl Future<Item = (), Error = ClientError>
[src]

Send a notification to the core. Most (if not all) notifications supported by the core are already implemented, so this method should not be necessary in most cases.

pub fn request(
    &self,
    method: &str,
    params: Value
) -> impl Future<Item = Value, Error = ClientError>
[src]

Send a request to the core. Most (if not all) notifications supported by the core are already implemented, so this method should not be necessary in most cases.

pub fn edit_request<T: Serialize>(
    &self,
    view_id: ViewId,
    method: &str,
    params: Option<T>
) -> impl Future<Item = Value, Error = ClientError>
[src]

pub fn edit_notify<T: Serialize>(
    &self,
    view_id: ViewId,
    method: &str,
    params: Option<T>
) -> impl Future<Item = (), Error = ClientError>
[src]

Send an "edit" notification. Most (if not all) "edit" commands are already implemented, so this method should not be necessary in most cases.

pub fn scroll(
    &self,
    view_id: ViewId,
    first_line: u64,
    last_line: u64
) -> impl Future<Item = (), Error = ClientError>
[src]

Send an "scroll" notification

{"method":"edit","params":{"method":"scroll","params":[21,80],
"view_id":"view-id-1"}}

pub fn goto_line(
    &self,
    view_id: ViewId,
    line: u64
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn copy(
    &self,
    view_id: ViewId
) -> impl Future<Item = Value, Error = ClientError>
[src]

pub fn paste(
    &self,
    view_id: ViewId,
    buffer: &str
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn cut(
    &self,
    view_id: ViewId
) -> impl Future<Item = Value, Error = ClientError>
[src]

pub fn undo(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn redo(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn find(
    &self,
    view_id: ViewId,
    search_term: &str,
    case_sensitive: bool,
    regex: bool,
    whole_words: bool
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn find_next(
    &self,
    view_id: ViewId,
    wrap_around: bool,
    allow_same: bool,
    modify_selection: ModifySelection
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn find_prev(
    &self,
    view_id: ViewId,
    wrap_around: bool,
    allow_same: bool,
    modify_selection: ModifySelection
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn find_all(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn highlight_find(
    &self,
    view_id: ViewId,
    visible: bool
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn left(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn left_sel(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn right(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn right_sel(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn up(&self, view_id: ViewId) -> impl Future<Item = (), Error = ClientError>[src]

pub fn up_sel(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn down(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn down_sel(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn backspace(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn delete(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn del(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn delete_word_backward(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn page_up(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn page_up_sel(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn page_down(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn page_down_sel(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn line_start(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn line_start_sel(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn line_end(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn line_end_sel(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn document_begin(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn document_begin_sel(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn document_end(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn document_end_sel(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn select_all(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn collapse_selections(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn insert(
    &self,
    view_id: ViewId,
    string: &str
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn insert_newline(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn insert_tab(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn f1(&self, view_id: ViewId) -> impl Future<Item = (), Error = ClientError>[src]

pub fn f2(&self, view_id: ViewId) -> impl Future<Item = (), Error = ClientError>[src]

pub fn char(
    &self,
    view_id: ViewId,
    ch: char
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn click(
    &self,
    view_id: ViewId,
    line: u64,
    column: u64
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn click_point_select(
    &self,
    view_id: ViewId,
    line: u64,
    column: u64
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn click_toggle_sel(
    &self,
    view_id: ViewId,
    line: u64,
    column: u64
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn click_range_select(
    &self,
    view_id: ViewId,
    line: u64,
    column: u64
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn click_line_select(
    &self,
    view_id: ViewId,
    line: u64,
    column: u64
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn click_word_select(
    &self,
    view_id: ViewId,
    line: u64,
    column: u64
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn click_multi_line_select(
    &self,
    view_id: ViewId,
    line: u64,
    column: u64
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn click_multi_word_select(
    &self,
    view_id: ViewId,
    line: u64,
    column: u64
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn drag(
    &self,
    view_id: ViewId,
    line: u64,
    column: u64
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn new_view(
    &self,
    file_path: Option<String>
) -> impl Future<Item = ViewId, Error = ClientError>
[src]

send a "new_view" request to the core.

{"id":1,"method":"new_view","params":{"file_path":"foo/test.txt"}}

pub fn close_view(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

send a "close_view" notifycation to the core.

pub fn save(
    &self,
    view_id: ViewId,
    file_path: &str
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn set_theme(
    &self,
    theme: &str
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn client_started(
    &self,
    config_dir: Option<&str>,
    client_extras_dir: Option<&str>
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn start_plugin(
    &self,
    view_id: ViewId,
    name: &str
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn stop_plugin(
    &self,
    view_id: ViewId,
    name: &str
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn notify_plugin(
    &self,
    view_id: ViewId,
    plugin: &str,
    method: &str,
    params: &Value
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn outdent(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn move_word_left(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn move_word_right(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn move_word_left_sel(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn move_word_right_sel(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn resize(
    &self,
    view_id: ViewId,
    width: i32,
    height: i32
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn replace(
    &self,
    view_id: ViewId,
    chars: &str,
    preserve_case: bool
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn replace_next(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn replace_all(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn set_language(
    &self,
    view_id: ViewId,
    lang_name: &str
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn selection_for_find(
    &self,
    view_id: ViewId,
    case_sensitive: bool
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn selection_for_replace(
    &self,
    view_id: ViewId,
    case_sensitive: bool
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn selection_into_lines(
    &self,
    view_id: ViewId
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn modify_user_config(
    &self,
    domain: &str,
    changes: Value
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn request_lines(
    &self,
    view_id: ViewId,
    first_line: u64,
    last_line: u64
) -> impl Future<Item = (), Error = ClientError>
[src]

pub fn shutdown(&self)[src]

Trait Implementations

impl Clone for Client[src]

Auto Trait Implementations

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.