[][src]Struct actix_web::dev::ResourceMap

pub struct ResourceMap { /* fields omitted */ }

Implementations

impl ResourceMap[src]

pub fn new(root: ResourceDef) -> Self[src]

pub fn add(
    &mut self,
    pattern: &mut ResourceDef,
    nested: Option<Rc<ResourceMap>>
)
[src]

pub fn url_for<U, I>(
    &self,
    req: &HttpRequest,
    name: &str,
    elements: U
) -> Result<Url, UrlGenerationError> where
    U: IntoIterator<Item = I>,
    I: AsRef<str>, 
[src]

Generate url for named resource

Check HttpRequest::url_for()(../struct.HttpRequest.html#method. url_for) for detailed information.

pub fn has_resource(&self, path: &str) -> bool[src]

pub fn match_name(&self, path: &str) -> Option<&str>[src]

Returns the name of the route that matches the given path or None if no full match is possible.

pub fn match_pattern(&self, path: &str) -> Option<String>[src]

Returns the full resource pattern matched against a path or None if no full match is possible.

Trait Implementations

impl Clone for ResourceMap[src]

impl Debug for ResourceMap[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,