pub struct Client(/* private fields */);Expand description
An interface to the frontend.
Implementations§
Source§impl Client
impl Client
pub fn new(peer: RpcPeer) -> Self
pub fn update_view(&self, view_id: ViewId, update: &Update)
pub fn scroll_to(&self, view_id: ViewId, line: usize, col: usize)
pub fn config_changed(&self, view_id: ViewId, changes: &Table)
pub fn available_themes(&self, theme_names: Vec<String>)
pub fn available_languages(&self, languages: Vec<LanguageId>)
pub fn theme_changed(&self, name: &str, theme: &ThemeSettings)
pub fn language_changed(&self, view_id: ViewId, new_lang: &LanguageId)
Sourcepub fn plugin_started(&self, view_id: ViewId, plugin: &str)
pub fn plugin_started(&self, view_id: ViewId, plugin: &str)
Notify the client that a plugin has started.
Sourcepub fn plugin_stopped(&self, view_id: ViewId, plugin: &str, code: i32)
pub fn plugin_stopped(&self, view_id: ViewId, plugin: &str, code: i32)
Notify the client that a plugin has stopped.
code is not currently used; in the future may be used to
pass an exit code.
Sourcepub fn available_plugins(&self, view_id: ViewId, plugins: &[ClientPluginInfo])
pub fn available_plugins(&self, view_id: ViewId, plugins: &[ClientPluginInfo])
Notify the client of the available plugins.
pub fn update_cmds(&self, view_id: ViewId, plugin: &str, cmds: &[Command])
pub fn def_style(&self, style: &Value)
pub fn find_status(&self, view_id: ViewId, queries: &Value)
pub fn replace_status(&self, view_id: ViewId, replace: &Value)
Sourcepub fn measure_width(&self, reqs: &[WidthReq]) -> Result<WidthResponse, Error>
pub fn measure_width(&self, reqs: &[WidthReq]) -> Result<WidthResponse, Error>
Ask front-end to measure widths of strings.
pub fn alert<S: AsRef<str>>(&self, msg: S)
pub fn add_status_item( &self, view_id: ViewId, source: &str, key: &str, value: &str, alignment: &str, )
pub fn update_status_item(&self, view_id: ViewId, key: &str, value: &str)
pub fn remove_status_item(&self, view_id: ViewId, key: &str)
pub fn show_hover(&self, view_id: ViewId, request_id: usize, result: String)
pub fn schedule_idle(&self, token: usize)
pub fn schedule_timer(&self, timeout: Instant, token: usize)
Trait Implementations§
Source§impl WidthMeasure for Client
impl WidthMeasure for Client
fn measure_width(&self, request: &[WidthReq]) -> Result<WidthResponse, Error>
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !Sync for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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