pub struct BoxedAsyncSpecification<T: ?Sized + Sync, Error: Send> { /* private fields */ }Expand description
An explicitly type-erased asynchronous specification.
This is the object-safe boundary for AsyncSpecification. Construction
requires Send + Sync + 'static; the adapter allocates one boxed future per
evaluation, while static async composition keeps its concrete future type.
Implementations§
Trait Implementations§
Source§impl<T: ?Sized + Sync, Error: Send> AsyncSpecification<T> for BoxedAsyncSpecification<T, Error>
impl<T: ?Sized + Sync, Error: Send> AsyncSpecification<T> for BoxedAsyncSpecification<T, Error>
Source§fn is_satisfied_by<'candidate>(
&'candidate self,
candidate: &'candidate T,
) -> impl Future<Output = Result<bool, Self::Error>> + Send + 'candidate
fn is_satisfied_by<'candidate>( &'candidate self, candidate: &'candidate T, ) -> impl Future<Output = Result<bool, Self::Error>> + Send + 'candidate
Evaluates the rule and returns a
Send future with a typed result.Source§fn and<Other>(self, other: Other) -> AsyncAnd<Self, Other>
fn and<Other>(self, other: Other) -> AsyncAnd<Self, Other>
Combines this rule with
other using asynchronous short-circuiting AND.Auto Trait Implementations§
impl<T, Error> !RefUnwindSafe for BoxedAsyncSpecification<T, Error>
impl<T, Error> !UnwindSafe for BoxedAsyncSpecification<T, Error>
impl<T, Error> Freeze for BoxedAsyncSpecification<T, Error>where
T: ?Sized,
impl<T, Error> Send for BoxedAsyncSpecification<T, Error>where
T: ?Sized,
impl<T, Error> Sync for BoxedAsyncSpecification<T, Error>where
T: ?Sized,
impl<T, Error> Unpin for BoxedAsyncSpecification<T, Error>where
T: ?Sized,
impl<T, Error> UnsafeUnpin for BoxedAsyncSpecification<T, Error>where
T: ?Sized,
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
Mutably borrows from an owned value. Read more