Trait RuntimeMarker

Source
pub trait RuntimeMarker: Sealed { }
Expand description

Marker trait for runtime types.

This trait is used to mark types that represent different async runtimes (such as Tokio or async-std) or the absence of an async runtime.

§Examples

use cel_cxx::marker::RuntimeMarker;

// The unit type represents no async runtime
fn sync_example<R: RuntimeMarker>() {
    // This works with any runtime marker
}

Implementations on Foreign Types§

Source§

impl RuntimeMarker for ()

Implementation for the unit type (no async runtime).

Implementors§

Source§

impl<T: Runtime> RuntimeMarker for T

Available on crate feature async only.

Runtime marker implementation for async runtime types.