pub struct PolicyMiddleware { /* private fields */ }Expand description
Middleware adapter for a reusable authorization or approval policy.
Implementations§
Source§impl PolicyMiddleware
impl PolicyMiddleware
Sourcepub fn new(policy: Arc<dyn GatewayPolicy>) -> Self
pub fn new(policy: Arc<dyn GatewayPolicy>) -> Self
Wraps an object-safe gateway policy.
Trait Implementations§
Source§impl Clone for PolicyMiddleware
impl Clone for PolicyMiddleware
Source§fn clone(&self) -> PolicyMiddleware
fn clone(&self) -> PolicyMiddleware
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PolicyMiddleware
impl Debug for PolicyMiddleware
Source§impl GatewayMiddleware for PolicyMiddleware
impl GatewayMiddleware for PolicyMiddleware
Source§fn handle<'a>(
&'a self,
request: DelegationRequest,
next: GatewayNext<'a>,
) -> GatewayFuture<'a, Result<AgentOutcome, GatewayError>>
fn handle<'a>( &'a self, request: DelegationRequest, next: GatewayNext<'a>, ) -> GatewayFuture<'a, Result<AgentOutcome, GatewayError>>
Handles one delegation invocation.
Auto Trait Implementations§
impl !RefUnwindSafe for PolicyMiddleware
impl !UnwindSafe for PolicyMiddleware
impl Freeze for PolicyMiddleware
impl Send for PolicyMiddleware
impl Sync for PolicyMiddleware
impl Unpin for PolicyMiddleware
impl UnsafeUnpin for PolicyMiddleware
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