cushy

Trait 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.

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§

Source§

impl AppRuntime for DefaultRuntime

Source§

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

Source§

impl AppRuntime for TokioRuntime

Source§

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