Struct ya_runtime_sdk::Context[][src]

pub struct Context<R: Runtime + ?Sized> {
    pub cli: <R as RuntimeDef>::Cli,
    pub conf: <R as RuntimeDef>::Conf,
    pub conf_path: PathBuf,
    pub emitter: Option<EventEmitter>,
    // some fields omitted
}
Expand description

Runtime execution context

Fields

cli: <R as RuntimeDef>::Cli

Command line parameters

conf: <R as RuntimeDef>::Conf

Configuration read from the configuration file

conf_path: PathBuf

Configuration file path

emitter: Option<EventEmitter>

Event emitter, available when Runtime::MODE == RuntimeMode::Server and command != Command::Deploy

Implementations

Create a new instance with a default environment configuration

Create a new instance with provided environment configuration

Read configuration from file

Write configuration to file

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

Performs the conversion.

Performs the conversion.

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.