Struct Engine

Source
pub struct Engine {
    pub config: Config,
    /* private fields */
}
Expand description

The core of a webkitten application. The engine handles configuration options and responding to lifecycle and user events from the UI.

Fields§

§config: Config

Implementations§

Source§

impl Engine

Source

pub fn new(runtime: RunConfiguration) -> Option<Self>

Create a new application engine

Source

pub fn initial_pages<'a>(&'a self) -> &'a Vec<String>

Any arguments specified at launch to be opened

Source

pub fn reload(&mut self) -> bool

Reload configuration from path

Trait Implementations§

Source§

impl EventHandler for Engine

Source§

fn on_new_frame_request<T, S>(&self, ui: &T, window_index: u32, uri: &str)

Handle a request to open a URI in a new frame
Source§

fn execute_command<T, S>(&self, ui: &T, window_index: Option<u32>, text: &str)

Handle a Return key press within the command bar
Source§

fn close<T, S>(&self, _ui: &T)

Close the application
Source§

fn command_completions<T, S>(&self, ui: &T, prefix: &str) -> Vec<String>

Get available commands and/or arguments given a prefix
Source§

fn on_buffer_event<T, S>( &self, ui: &T, window_index: u32, webview_index: u32, uri: Option<&str>, event: BufferEvent, )

Handle a buffer event Read more

Auto Trait Implementations§

§

impl Freeze for Engine

§

impl RefUnwindSafe for Engine

§

impl Send for Engine

§

impl Sync for Engine

§

impl Unpin for Engine

§

impl UnwindSafe for Engine

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.