Trait FnMarker

Source
pub trait FnMarker: Sealed { }
Expand description

Marker trait for function types.

This trait is used to distinguish between synchronous and asynchronous functions in the type system. It allows the library to provide different behavior based on whether functions are sync or async.

§Examples

use cel_cxx::marker::FnMarker;

// The unit type represents synchronous functions
fn sync_function_example<F: FnMarker>() {
    // This works with any function marker
}

Implementations on Foreign Types§

Source§

impl FnMarker for ()

Synchronous function marker implementation.

The unit type () represents synchronous functions.

Implementors§

Source§

impl FnMarker for Async

Available on crate feature async only.

Function marker implementation for async functions.