Struct actix_web_middleware_opa::PolicyVerifier
source · pub struct PolicyVerifier<A, B> { /* private fields */ }
Implementations
sourceimpl<A, B> PolicyVerifier<A, B>where
A: Serialize,
impl<A, B> PolicyVerifier<A, B>where
A: Serialize,
pub fn build(url: String) -> Self
pub fn url(self, url: String) -> PolicyVerifier<A, B>
pub fn timeout(self, timeout: Duration) -> PolicyVerifier<A, B>
pub fn build_request(&self, req: &A) -> SendRequest
Trait Implementations
sourceimpl<A: 'static, B: 'static, S> Middleware<S> for PolicyVerifier<A, B>where
A: OPARequest<S> + Serialize,
B: OPAResponse + DeserializeOwned,
impl<A: 'static, B: 'static, S> Middleware<S> for PolicyVerifier<A, B>where
A: OPARequest<S> + Serialize,
B: OPAResponse + DeserializeOwned,
sourcefn start(&self, req: &HttpRequest<S>) -> Result<Started>
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
Method is called when request is ready. It may return
future, which should resolve before next middleware get called. Read more
sourcefn response(
&self,
req: &HttpRequest<S>,
resp: HttpResponse
) -> Result<Response, Error>
fn response(
&self,
req: &HttpRequest<S>,
resp: HttpResponse
) -> Result<Response, Error>
Method is called when handler returns response,
but before sending http message to peer. Read more
sourcefn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
Method is called after body stream get sent to peer.
Auto Trait Implementations
impl<A, B> RefUnwindSafe for PolicyVerifier<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for PolicyVerifier<A, B>where
A: Send,
B: Send,
impl<A, B> Sync for PolicyVerifier<A, B>where
A: Sync,
B: Sync,
impl<A, B> Unpin for PolicyVerifier<A, B>where
A: Unpin,
B: Unpin,
impl<A, B> UnwindSafe for PolicyVerifier<A, B>where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more