Enum Async

Source
pub enum Async {}
Available on crate feature async only.
Expand description

Async-specific marker types and implementations.

This module contains the marker types and trait implementations for asynchronous function support. It’s only available when the async feature is enabled. Marker type for asynchronous functions.

This is a zero-sized type used to mark contexts that support asynchronous function evaluation.

§Examples

use cel_cxx::{Env, marker::Async};

// Create an async-capable environment
let env = Env::builder()
    .force_async()
    .build()?;

Trait Implementations§

Source§

impl FnMarkerAggr<()> for Async

Aggregating sync with async yields async.

When synchronous and asynchronous capabilities are combined, the result supports asynchronous operations.

Source§

type Output = Async

The resulting function marker after aggregation.
Source§

impl FnMarkerAggr<Async> for ()

Aggregating async with sync yields async.

When asynchronous and synchronous capabilities are combined, the result supports asynchronous operations.

Source§

type Output = Async

The resulting function marker after aggregation.
Source§

impl FnMarkerAggr<Async> for Async

Aggregating async with async yields async.

Combining two async contexts remains async.

Source§

type Output = Async

The resulting function marker after aggregation.
Source§

impl<'a, T> FnResult<'a, T> for Async

Asynchronous function results.

For asynchronous functions, the result type is wrapped in a BoxFuture. This allows async functions to return futures that can be awaited.

Source§

type Output = Pin<Box<dyn Future<Output = T> + Send + 'a>>

The output type for this function marker and base type.
Source§

impl<'f, F, Fut, R> IntoFunction<'f, Async> for F
where F: Fn() -> Fut + Send + Sync + 'f, Fut: Future<Output = R> + Send + 'f, R: IntoResult + Send + Sync + 'f,

Source§

fn into_function(self) -> Function<'f>

Convert this function into a type-erased implementation. Read more
Source§

impl<'f, F, Fut, R, A1> IntoFunction<'f, Async, (A1,)> for F
where F: Fn(A1) -> Fut + Send + Sync + 'f, Fut: Future<Output = R> + Send + 'f, R: IntoResult + Send + Sync + 'f, A1: FromValue + TypedValue + Send + Sync + 'f,

Source§

fn into_function(self) -> Function<'f>

Convert this function into a type-erased implementation. Read more
Source§

impl<'f, F, Fut, R, A1, A2> IntoFunction<'f, Async, (A1, A2)> for F
where F: Fn(A1, A2) -> Fut + Send + Sync + 'f, Fut: Future<Output = R> + Send + 'f, R: IntoResult + Send + Sync + 'f, A1: FromValue + TypedValue + Send + Sync + 'f, A2: FromValue + TypedValue + Send + Sync + 'f,

Source§

fn into_function(self) -> Function<'f>

Convert this function into a type-erased implementation. Read more
Source§

impl<'f, F, Fut, R, A1, A2, A3> IntoFunction<'f, Async, (A1, A2, A3)> for F
where F: Fn(A1, A2, A3) -> Fut + Send + Sync + 'f, Fut: Future<Output = R> + Send + 'f, R: IntoResult + Send + Sync + 'f, A1: FromValue + TypedValue + Send + Sync + 'f, A2: FromValue + TypedValue + Send + Sync + 'f, A3: FromValue + TypedValue + Send + Sync + 'f,

Source§

fn into_function(self) -> Function<'f>

Convert this function into a type-erased implementation. Read more
Source§

impl<'f, F, Fut, R, A1, A2, A3, A4> IntoFunction<'f, Async, (A1, A2, A3, A4)> for F
where F: Fn(A1, A2, A3, A4) -> Fut + Send + Sync + 'f, Fut: Future<Output = R> + Send + 'f, R: IntoResult + Send + Sync + 'f, A1: FromValue + TypedValue + Send + Sync + 'f, A2: FromValue + TypedValue + Send + Sync + 'f, A3: FromValue + TypedValue + Send + Sync + 'f, A4: FromValue + TypedValue + Send + Sync + 'f,

Source§

fn into_function(self) -> Function<'f>

Convert this function into a type-erased implementation. Read more
Source§

impl<'f, F, Fut, R, A1, A2, A3, A4, A5> IntoFunction<'f, Async, (A1, A2, A3, A4, A5)> for F
where F: Fn(A1, A2, A3, A4, A5) -> Fut + Send + Sync + 'f, Fut: Future<Output = R> + Send + 'f, R: IntoResult + Send + Sync + 'f, A1: FromValue + TypedValue + Send + Sync + 'f, A2: FromValue + TypedValue + Send + Sync + 'f, A3: FromValue + TypedValue + Send + Sync + 'f, A4: FromValue + TypedValue + Send + Sync + 'f, A5: FromValue + TypedValue + Send + Sync + 'f,

Source§

fn into_function(self) -> Function<'f>

Convert this function into a type-erased implementation. Read more
Source§

impl<'f, F, Fut, R, A1, A2, A3, A4, A5, A6> IntoFunction<'f, Async, (A1, A2, A3, A4, A5, A6)> for F
where F: Fn(A1, A2, A3, A4, A5, A6) -> Fut + Send + Sync + 'f, Fut: Future<Output = R> + Send + 'f, R: IntoResult + Send + Sync + 'f, A1: FromValue + TypedValue + Send + Sync + 'f, A2: FromValue + TypedValue + Send + Sync + 'f, A3: FromValue + TypedValue + Send + Sync + 'f, A4: FromValue + TypedValue + Send + Sync + 'f, A5: FromValue + TypedValue + Send + Sync + 'f, A6: FromValue + TypedValue + Send + Sync + 'f,

Source§

fn into_function(self) -> Function<'f>

Convert this function into a type-erased implementation. Read more
Source§

impl<'f, F, Fut, R, A1, A2, A3, A4, A5, A6, A7> IntoFunction<'f, Async, (A1, A2, A3, A4, A5, A6, A7)> for F
where F: Fn(A1, A2, A3, A4, A5, A6, A7) -> Fut + Send + Sync + 'f, Fut: Future<Output = R> + Send + 'f, R: IntoResult + Send + Sync + 'f, A1: FromValue + TypedValue + Send + Sync + 'f, A2: FromValue + TypedValue + Send + Sync + 'f, A3: FromValue + TypedValue + Send + Sync + 'f, A4: FromValue + TypedValue + Send + Sync + 'f, A5: FromValue + TypedValue + Send + Sync + 'f, A6: FromValue + TypedValue + Send + Sync + 'f, A7: FromValue + TypedValue + Send + Sync + 'f,

Source§

fn into_function(self) -> Function<'f>

Convert this function into a type-erased implementation. Read more
Source§

impl<'f, F, Fut, R, A1, A2, A3, A4, A5, A6, A7, A8> IntoFunction<'f, Async, (A1, A2, A3, A4, A5, A6, A7, A8)> for F
where F: Fn(A1, A2, A3, A4, A5, A6, A7, A8) -> Fut + Send + Sync + 'f, Fut: Future<Output = R> + Send + 'f, R: IntoResult + Send + Sync + 'f, A1: FromValue + TypedValue + Send + Sync + 'f, A2: FromValue + TypedValue + Send + Sync + 'f, A3: FromValue + TypedValue + Send + Sync + 'f, A4: FromValue + TypedValue + Send + Sync + 'f, A5: FromValue + TypedValue + Send + Sync + 'f, A6: FromValue + TypedValue + Send + Sync + 'f, A7: FromValue + TypedValue + Send + Sync + 'f, A8: FromValue + TypedValue + Send + Sync + 'f,

Source§

fn into_function(self) -> Function<'f>

Convert this function into a type-erased implementation. Read more
Source§

impl<'f, F, Fut, R, A1, A2, A3, A4, A5, A6, A7, A8, A9> IntoFunction<'f, Async, (A1, A2, A3, A4, A5, A6, A7, A8, A9)> for F
where F: Fn(A1, A2, A3, A4, A5, A6, A7, A8, A9) -> Fut + Send + Sync + 'f, Fut: Future<Output = R> + Send + 'f, R: IntoResult + Send + Sync + 'f, A1: FromValue + TypedValue + Send + Sync + 'f, A2: FromValue + TypedValue + Send + Sync + 'f, A3: FromValue + TypedValue + Send + Sync + 'f, A4: FromValue + TypedValue + Send + Sync + 'f, A5: FromValue + TypedValue + Send + Sync + 'f, A6: FromValue + TypedValue + Send + Sync + 'f, A7: FromValue + TypedValue + Send + Sync + 'f, A8: FromValue + TypedValue + Send + Sync + 'f, A9: FromValue + TypedValue + Send + Sync + 'f,

Source§

fn into_function(self) -> Function<'f>

Convert this function into a type-erased implementation. Read more
Source§

impl<'f, F, Fut, R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> IntoFunction<'f, Async, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> for F
where F: Fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) -> Fut + Send + Sync + 'f, Fut: Future<Output = R> + Send + 'f, R: IntoResult + Send + Sync + 'f, A1: FromValue + TypedValue + Send + Sync + 'f, A2: FromValue + TypedValue + Send + Sync + 'f, A3: FromValue + TypedValue + Send + Sync + 'f, A4: FromValue + TypedValue + Send + Sync + 'f, A5: FromValue + TypedValue + Send + Sync + 'f, A6: FromValue + TypedValue + Send + Sync + 'f, A7: FromValue + TypedValue + Send + Sync + 'f, A8: FromValue + TypedValue + Send + Sync + 'f, A9: FromValue + TypedValue + Send + Sync + 'f, A10: FromValue + TypedValue + Send + Sync + 'f,

Source§

fn into_function(self) -> Function<'f>

Convert this function into a type-erased implementation. Read more
Source§

impl FnMarker for Async

Function marker implementation for async functions.

Source§

impl FnMarkerAsync for Async

Async function marker trait implementation.

Auto Trait Implementations§

§

impl Freeze for Async

§

impl RefUnwindSafe for Async

§

impl Send for Async

§

impl Sync for Async

§

impl Unpin for Async

§

impl UnwindSafe for Async

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more