pub struct Session {
    pub plugins_db: PluginsDB,
    pub tree: Tree,
    pub task_scheduler: TaskScheduler,
}
Expand description

Contain instances of structure needed by TAP.

Fields

plugins_db: PluginsDB

A PluginsDB instance

tree: Tree

A Tree instance

task_scheduler: TaskScheduler

A TaskScheduler instance

Implementations

Return a new Session

Replace tree and task_scheduler by a new intance.

Create a crate::plugin::PluginInstance from plugin_name and argument add it to the scheduler and return it’s task id.

Create a crate::plugin::PluginInstance, add it to an available worker, wait for it to be executed and return the results. This function is blocking the TaskScheduler, so must be avoided in multithreaded code.

Join on all scheduled task. This function is blocking the TaskScheduler, so must be avoided in multithreaded code.

Trait Implementations

Returns the “default value” for a type. 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 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.