Skip to main content

PolicyFuture

Type Alias PolicyFuture 

Source
pub type PolicyFuture<'a> = Either<Ready<Result<bool>>, BoxFuture<'a, Result<bool>>>;
Expand description

Future type for single-block policy evaluation.

  • Left(Ready<...>): Synchronous result, zero heap allocation
  • Right(BoxFuture<...>): Async result, requires heap allocation

Aliased Type§

pub enum PolicyFuture<'a> {
    Left(Ready<Result<bool, Error>>),
    Right(Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'a>>),
}

Variants§

§

Left(Ready<Result<bool, Error>>)

First branch of the type

§

Right(Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'a>>)

Second branch of the type