pub struct GuardService<State, G>{ /* private fields */ }Implementations§
Source§impl<State, G> GuardService<State, G>
impl<State, G> GuardService<State, G>
pub fn new( state: State, expected_guard: G, err_msg: &'static str, ) -> GuardService<State, G>
Trait Implementations§
Source§impl<State, G> Clone for GuardService<State, G>
impl<State, G> Clone for GuardService<State, G>
Source§fn clone(&self) -> GuardService<State, G>
fn clone(&self) -> GuardService<State, G>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<State, G> Service<Parts> for GuardService<State, G>where
State: Sync + Send + Clone + 'static,
G: Clone + FromRequestParts<State, Rejection = (StatusCode, String)> + Guard + Sync + Send + 'static,
impl<State, G> Service<Parts> for GuardService<State, G>where
State: Sync + Send + Clone + 'static,
G: Clone + FromRequestParts<State, Rejection = (StatusCode, String)> + Guard + Sync + Send + 'static,
Source§type Response = GuardServiceResponse
type Response = GuardServiceResponse
Responses given by the service.
Source§type Error = (StatusCode, String)
type Error = (StatusCode, String)
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<GuardService<State, G> as Service<Parts>>::Response, <GuardService<State, G> as Service<Parts>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<GuardService<State, G> as Service<Parts>>::Response, <GuardService<State, G> as Service<Parts>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl<State, G> Freeze for GuardService<State, G>
impl<State, G> RefUnwindSafe for GuardService<State, G>where
State: RefUnwindSafe,
G: RefUnwindSafe,
impl<State, G> Send for GuardService<State, G>
impl<State, G> Sync for GuardService<State, G>
impl<State, G> Unpin for GuardService<State, G>
impl<State, G> UnwindSafe for GuardService<State, G>where
State: UnwindSafe,
G: UnwindSafe,
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