[][src]Struct xi_core_lib::core::WeakXiCore

pub struct WeakXiCore(_);

A weak reference to the main state. This is passed to plugin threads.

Methods

impl WeakXiCore[src]

pub fn plugin_connect(&self, plugin: Result<Plugin, Error>)[src]

Called immediately after attempting to start a plugin, from the plugin's thread.

pub fn plugin_exit(&self, plugin: PluginId, error: Result<(), ReadError>)[src]

Called from a plugin runloop thread when the runloop exits.

pub fn handle_plugin_update(
    &self,
    plugin: PluginId,
    view: ViewId,
    response: Result<Value, RpcError>
)
[src]

Handles the result of an update sent to a plugin.

All plugins must acknowledge when they are sent a new update, so that core can track which revisions are still 'live', that is can still be the base revision for a delta. Once a plugin has acknowledged a new revision, it can no longer send deltas against any older revision.

Trait Implementations

impl Clone for WeakXiCore[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Handler for WeakXiCore[src]

Handler for messages originating from plugins.

type Notification = PluginCommand<PluginNotification>

type Request = PluginCommand<PluginRequest>

fn idle(&mut self, ctx: &RpcCtx, token: usize)[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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