pub struct WebfingerGuard;Expand description
A predicate for Actix Web route filters
This predicate matches GET requests with valid Accept headers. A valid Accept header is any
Accept headers that matches a superset of application/jrd+json.
Valid Accept Headers
- `application/jrd+json’
application/jsonapplication/**/*
ⓘ
use actix_web::App;
use actix_webfinger::WebfingerGuard;
let app = App::new()
.resource("/.well-known/webfinger", |r| {
r.route()
.filter(WebfingerGuard)
.with(your_route_handler)
})
.finish();Trait Implementations§
Source§impl Guard for WebfingerGuard
impl Guard for WebfingerGuard
Source§fn check(&self, ctx: &GuardContext<'_>) -> bool
fn check(&self, ctx: &GuardContext<'_>) -> bool
Returns true if predicate condition is met for a given request.
Auto Trait Implementations§
impl Freeze for WebfingerGuard
impl RefUnwindSafe for WebfingerGuard
impl Send for WebfingerGuard
impl Sync for WebfingerGuard
impl Unpin for WebfingerGuard
impl UnwindSafe for WebfingerGuard
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