Trait RuntimeBuilder

Source
pub trait RuntimeBuilder: Debug {
    type Runtime: Runtime;

    // Required methods
    fn name() -> &'static str;
    fn new(bin_root: PathBuf, home: PathBuf) -> Result<Self::Runtime, Error>;
    fn with_home(
        bin_root: PathBuf,
        home: PathBuf,
    ) -> Result<Self::Runtime, Error>;
}
Available on Unix only.
Expand description

Abstract factory for Runtime

Required Associated Types§

Source

type Runtime: Runtime

The Runtime being built

Required Methods§

Source

fn name() -> &'static str

Name for the runtime (useful for defining a home)

Source

fn new(bin_root: PathBuf, home: PathBuf) -> Result<Self::Runtime, Error>

Initialize a new runtime’s home

Source

fn with_home(bin_root: PathBuf, home: PathBuf) -> Result<Self::Runtime, Error>

Reuse an existing runtime’s home

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§