Struct vertigo::Driver

source ·
pub struct Driver { /* private fields */ }
Expand description

Main connection to vertigo facilities - dependencies and rendering client (the browser).

This is in fact only a box for inner generic driver. This way a web developer don’t need to worry about the specific driver used, though usually it is the BrowserDriver which is used to create a Driver.

Additionally driver struct wraps Dependencies object.

Implementations

Create new FetchBuilder.

Gets a cookie by name

Sets a cookie under provided name

Retrieves the hash part of location URL from client (browser)

Sets the hash part of location URL from client (browser)

Set event handler upon hash location change

Make func fire every time seconds.

Gets current value of monotonic clock.

Create new RequestBuilder (more complex version of fetch)

Initiate a websocket connection. Provided callback should handle a single WebsocketMessage.

Spawn a future - thus allowing to fire async functions in, for example, event handler. Handy when fetching resources from internet.

Fire provided function in a way that all changes in dependency graph made by this function will trigger only one run of updates, just like the changes were done all at once.

Function added for diagnostic purposes. It allows you to check whether a block with a transaction is missing somewhere.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.