Struct rocket_api_base::RocketJWTAuthFairing [−][src]
pub struct RocketJWTAuthFairing<T> where
T: Serialize + DeserializeOwned + Clone, { /* fields omitted */ }
Implementations
impl<T> RocketJWTAuthFairing<T> where
T: Serialize + DeserializeOwned + Clone,
[src]
impl<T> RocketJWTAuthFairing<T> where
T: Serialize + DeserializeOwned + Clone,
[src]pub fn new(
secret: String,
error_handler: impl Fn(AuthError) -> String + Send + Sync + 'static,
further_checks: Option<impl Fn(JWToken<T>) -> Result<(), String> + Send + Sync + 'static>
) -> Self
[src]
secret: String,
error_handler: impl Fn(AuthError) -> String + Send + Sync + 'static,
further_checks: Option<impl Fn(JWToken<T>) -> Result<(), String> + Send + Sync + 'static>
) -> Self
pub fn new_with_excludes(
secret: String,
error_handler: impl Fn(AuthError) -> String + Send + Sync + 'static,
further_checks: Option<impl Fn(JWToken<T>) -> Result<(), String> + Send + Sync + 'static>,
excludes: Vec<&str>
) -> Self
[src]
secret: String,
error_handler: impl Fn(AuthError) -> String + Send + Sync + 'static,
further_checks: Option<impl Fn(JWToken<T>) -> Result<(), String> + Send + Sync + 'static>,
excludes: Vec<&str>
) -> Self
pub fn new_with_includes(
secret: String,
error_handler: impl Fn(AuthError) -> String + Send + Sync + 'static,
further_checks: Option<impl Fn(JWToken<T>) -> Result<(), String> + Send + Sync + 'static>,
includes: Vec<&str>
) -> Self
[src]
secret: String,
error_handler: impl Fn(AuthError) -> String + Send + Sync + 'static,
further_checks: Option<impl Fn(JWToken<T>) -> Result<(), String> + Send + Sync + 'static>,
includes: Vec<&str>
) -> Self
Trait Implementations
impl<T> Fairing for RocketJWTAuthFairing<T> where
T: Serialize + DeserializeOwned + Clone + 'static,
[src]
impl<T> Fairing for RocketJWTAuthFairing<T> where
T: Serialize + DeserializeOwned + Clone + 'static,
[src]fn on_request(&self, request: &mut Request<'_>, _: &Data)
[src]
fn on_request(&self, request: &mut Request<'_>, _: &Data)
[src]The request callback. Read more
fn on_attach(&self, rocket: Rocket) -> Result<Rocket, Rocket>
[src]
fn on_attach(&self, rocket: Rocket) -> Result<Rocket, Rocket>
[src]The attach callback. Returns Ok
if launch should proceed and Err
if
launch should be aborted. Read more
fn on_response(&self, request: &Request<'_>, response: &mut Response<'_>)
[src]
fn on_response(&self, request: &Request<'_>, response: &mut Response<'_>)
[src]The response callback. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for RocketJWTAuthFairing<T>
impl<T> Send for RocketJWTAuthFairing<T>
impl<T> Sync for RocketJWTAuthFairing<T>
impl<T> Unpin for RocketJWTAuthFairing<T>
impl<T> !UnwindSafe for RocketJWTAuthFairing<T>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
Converts self
into a collection.
pub fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,