[][src]Struct environment::RuntimeContext

pub struct RuntimeContext<E: EthSpec> {
    pub executor: TaskExecutor,
    pub log: Logger,
    pub eth_spec_instance: E,
    pub eth2_config: Eth2Config,

An execution context that can be used by a service.

Distinct from an Environment because a Context is not able to give a mutable reference to a Runtime, instead it only has access to a TaskExecutor.


executor: TaskExecutorlog: Loggereth_spec_instance: Eeth2_config: Eth2Config


impl<E: EthSpec> RuntimeContext<E>[src]

pub fn service_context(&self, service_name: &'static str) -> Self[src]

Returns a sub-context of this context.

The generated service will have the service_name in all it's logs.

pub fn eth2_config(&self) -> &Eth2Config[src]

Returns the eth2_config for this service.

Trait Implementations

impl<E: Clone + EthSpec> Clone for RuntimeContext<E>[src]

Auto Trait Implementations

impl<E> Send for RuntimeContext<E>

impl<E> Unpin for RuntimeContext<E> where
    E: Unpin

impl<E> Sync for RuntimeContext<E>

impl<E> !UnwindSafe for RuntimeContext<E>

impl<E> !RefUnwindSafe for RuntimeContext<E>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,