Trait cushy::AppRuntime

source ·
pub trait AppRuntime:
    Send
    + Clone
    + 'static {
    type Guard<'a>;

    // Required method
    fn enter(&self) -> Self::Guard<'_>;
}
Expand description

A runtime associated with the Cushy application.

This trait is how Cushy adds optional support for tokio.

Required Associated Types§

source

type Guard<'a>

The guard type returned from entering the context of the app’s runtime.

Required Methods§

source

fn enter(&self) -> Self::Guard<'_>

Enter the application’s rutime context.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl AppRuntime for DefaultRuntime

source§

type Guard<'a> = DefaultRuntimeGuard<'a>

source§

impl AppRuntime for TokioRuntime

source§

type Guard<'a> = EnterGuard<'a>