[][src]Struct wikidot_path::prelude::Request

pub struct Request<'a> {
    pub slug: &'a str,
    pub categories: Vec<&'a str>,
    pub arguments: HashMap<&'a str, ArgumentValue<'a>>,
}

Represents a request for a page.

Fields

slug: &'a str

The slug, or URL identifier of a page.

For a page like "SCP-1000" this will be scp-1000.

categories: Vec<&'a str>

A list of categories this page is in, in order of appearance.

An empty list indicates that no categories were specified, that is, no colons were present in the path. By convention any pages like this are considered to be in the _default category.

arguments: HashMap<&'a str, ArgumentValue<'a>>

What arguments were passed into the request, as a mapping of key to value.

Methods

impl<'a> Request<'a>[src]

pub fn parse(path: &'a str) -> Self[src]

Parses a path to extract the slug, categories, and arguments. Makes a best-effort match if the path is not in normal form.

Trait Implementations

impl<'a> Clone for Request<'a>[src]

impl<'a> Debug for Request<'a>[src]

impl<'a> Eq for Request<'a>[src]

impl<'a> PartialEq<Request<'a>> for Request<'a>[src]

impl<'a> StructuralEq for Request<'a>[src]

impl<'a> StructuralPartialEq for Request<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Request<'a>

impl<'a> Send for Request<'a>

impl<'a> Sync for Request<'a>

impl<'a> Unpin for Request<'a>

impl<'a> UnwindSafe for Request<'a>

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, U> Into<U> for T where
    U: From<T>, 
[src]

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.