pub enum Async {}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.
impl FnMarkerAggr<()> for Async
Aggregating sync with async yields async.
When synchronous and asynchronous capabilities are combined, the result supports asynchronous operations.
Source§impl FnMarkerAggr<Async> for ()
Aggregating async with sync yields async.
impl FnMarkerAggr<Async> for ()
Aggregating async with sync yields async.
When asynchronous and synchronous capabilities are combined, the result supports asynchronous operations.
Source§impl FnMarkerAggr<Async> for Async
Aggregating async with async yields async.
impl FnMarkerAggr<Async> for Async
Aggregating async with async yields async.
Combining two async contexts remains async.
Source§impl<'a, T> FnResult<'a, T> for Async
Asynchronous function results.
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§impl<'f, F, Fut, R> IntoFunction<'f, Async> for F
impl<'f, F, Fut, R> IntoFunction<'f, Async> for F
Source§fn into_function(self) -> Function<'f>
fn into_function(self) -> Function<'f>
Source§impl<'f, F, Fut, R, A1> IntoFunction<'f, Async, (A1,)> for F
impl<'f, F, Fut, R, A1> IntoFunction<'f, Async, (A1,)> for F
Source§fn into_function(self) -> Function<'f>
fn into_function(self) -> Function<'f>
Source§impl<'f, F, Fut, R, A1, A2> IntoFunction<'f, Async, (A1, A2)> for F
impl<'f, F, Fut, R, A1, A2> IntoFunction<'f, Async, (A1, A2)> for F
Source§fn into_function(self) -> Function<'f>
fn into_function(self) -> Function<'f>
Source§impl<'f, F, Fut, R, A1, A2, A3> IntoFunction<'f, Async, (A1, A2, A3)> for Fwhere
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,
impl<'f, F, Fut, R, A1, A2, A3> IntoFunction<'f, Async, (A1, A2, A3)> for Fwhere
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>
fn into_function(self) -> Function<'f>
Source§impl<'f, F, Fut, R, A1, A2, A3, A4> IntoFunction<'f, Async, (A1, A2, A3, A4)> for Fwhere
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,
impl<'f, F, Fut, R, A1, A2, A3, A4> IntoFunction<'f, Async, (A1, A2, A3, A4)> for Fwhere
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>
fn into_function(self) -> Function<'f>
Source§impl<'f, F, Fut, R, A1, A2, A3, A4, A5> IntoFunction<'f, Async, (A1, A2, A3, A4, A5)> for Fwhere
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,
impl<'f, F, Fut, R, A1, A2, A3, A4, A5> IntoFunction<'f, Async, (A1, A2, A3, A4, A5)> for Fwhere
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>
fn into_function(self) -> Function<'f>
Source§impl<'f, F, Fut, R, A1, A2, A3, A4, A5, A6> IntoFunction<'f, Async, (A1, A2, A3, A4, A5, A6)> for Fwhere
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,
impl<'f, F, Fut, R, A1, A2, A3, A4, A5, A6> IntoFunction<'f, Async, (A1, A2, A3, A4, A5, A6)> for Fwhere
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>
fn into_function(self) -> Function<'f>
Source§impl<'f, F, Fut, R, A1, A2, A3, A4, A5, A6, A7> IntoFunction<'f, Async, (A1, A2, A3, A4, A5, A6, A7)> for Fwhere
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,
impl<'f, F, Fut, R, A1, A2, A3, A4, A5, A6, A7> IntoFunction<'f, Async, (A1, A2, A3, A4, A5, A6, A7)> for Fwhere
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>
fn into_function(self) -> Function<'f>
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 Fwhere
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,
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 Fwhere
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>
fn into_function(self) -> Function<'f>
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 Fwhere
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,
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 Fwhere
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>
fn into_function(self) -> Function<'f>
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 Fwhere
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,
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 Fwhere
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>
fn into_function(self) -> Function<'f>
impl FnMarker for Async
Function marker implementation for async functions.
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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