Struct actix_router::Router
source · [−]pub struct Router<T, U = ()> { /* private fields */ }
Expand description
Resource router.
Implementations
sourceimpl<T, U> Router<T, U>
impl<T, U> Router<T, U>
pub fn build() -> RouterBuilder<T, U>
pub fn recognize<R, P>(&self, resource: &mut R) -> Option<(&T, ResourceId)> where
R: Resource<P>,
P: ResourcePath,
pub fn recognize_mut<R, P>(
&mut self,
resource: &mut R
) -> Option<(&mut T, ResourceId)> where
R: Resource<P>,
P: ResourcePath,
pub fn recognize_fn<R, P, F>(
&self,
resource: &mut R,
check: F
) -> Option<(&T, ResourceId)> where
F: Fn(&R, &Option<U>) -> bool,
R: Resource<P>,
P: ResourcePath,
pub fn recognize_mut_fn<R, P, F>(
&mut self,
resource: &mut R,
check: F
) -> Option<(&mut T, ResourceId)> where
F: Fn(&R, &Option<U>) -> bool,
R: Resource<P>,
P: ResourcePath,
Auto Trait Implementations
impl<T, U> RefUnwindSafe for Router<T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Router<T, U> where
T: Send,
U: Send,
impl<T, U> Sync for Router<T, U> where
T: Sync,
U: Sync,
impl<T, U> Unpin for Router<T, U> where
T: Unpin,
U: Unpin,
impl<T, U> UnwindSafe for Router<T, U> where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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