pub struct WebfingerPredicate;
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/json
application/*
*/*
use actix_web::App;
use actix_webfinger::WebfingerPredicate;
let app = App::new()
.resource("/.well-known/webfinger", |r| {
r.route()
.filter(WebfingerPredicate)
.with(your_route_handler)
})
.finish();
Check if request matches predicate
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static