Enum rocket::http::uri::fmt::Path[]

pub enum Path {}
Expand description

Marker type indicating use of a type for the path Part of a URI.

In route URIs, this corresponds to all of the text before a ?, if any, or all of the text in the URI otherwise:

#[get("/home/<name>/<page>?<item>")]
       ^------------------ Path

Trait Implementations

impl Clone for Path

pub fn clone(&self) -> Path

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Path

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

impl<'a, 'b> FromUriParam<Path, &'a &'b str> for PathBuf

A no cost conversion allowing an &&str to be used in place of a PathBuf.

type Target = &'b Path

The resulting type of this conversion.

pub fn from_uri_param(param: &'a &'b str) -> &'b Path

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<'a> FromUriParam<Path, &'a Path> for PathBuf

type Target = &'a Path

The resulting type of this conversion.

pub fn from_uri_param(param: &'a Path) -> &'a Path

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<'a> FromUriParam<Path, &'a Path> for &'a Path

type Target = &'a Path

The resulting type of this conversion.

pub fn from_uri_param(param: &'a Path) -> &'a Path

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<'a> FromUriParam<Path, &'a str> for PathBuf

A no cost conversion allowing an &str to be used in place of a PathBuf.

type Target = &'a Path

The resulting type of this conversion.

pub fn from_uri_param(param: &'a str) -> &'a Path

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<'x, 'a> FromUriParam<Path, &'x &'a Path> for PathBuf

type Target = &'x &'a Path

The resulting type of this conversion.

pub fn from_uri_param(param: &'x &'a Path) -> &'x &'a Path

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<'x, 'a> FromUriParam<Path, &'x &'a Path> for &'a Path

type Target = &'x &'a Path

The resulting type of this conversion.

pub fn from_uri_param(param: &'x &'a Path) -> &'x &'a Path

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<'x> FromUriParam<Path, &'x PathBuf> for PathBuf

type Target = &'x PathBuf

The resulting type of this conversion.

pub fn from_uri_param(param: &'x PathBuf) -> &'x PathBuf

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<'x, 'a> FromUriParam<Path, &'x PathBuf> for &'a Path

type Target = &'x PathBuf

The resulting type of this conversion.

pub fn from_uri_param(param: &'x PathBuf) -> &'x PathBuf

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<'x, 'a> FromUriParam<Path, &'x mut &'a Path> for PathBuf

type Target = &'x mut &'a Path

The resulting type of this conversion.

pub fn from_uri_param(param: &'x mut &'a Path) -> &'x mut &'a Path

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<'x, 'a> FromUriParam<Path, &'x mut &'a Path> for &'a Path

type Target = &'x mut &'a Path

The resulting type of this conversion.

pub fn from_uri_param(param: &'x mut &'a Path) -> &'x mut &'a Path

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<'x, 'a> FromUriParam<Path, &'x mut PathBuf> for &'a Path

type Target = &'x mut PathBuf

The resulting type of this conversion.

pub fn from_uri_param(param: &'x mut PathBuf) -> &'x mut PathBuf

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<'x> FromUriParam<Path, &'x mut PathBuf> for PathBuf

type Target = &'x mut PathBuf

The resulting type of this conversion.

pub fn from_uri_param(param: &'x mut PathBuf) -> &'x mut PathBuf

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<A, T> FromUriParam<Path, A> for Option<T> where
    T: FromUriParam<Path, A>, 

A no cost conversion allowing any T to be used in place of an Option<T>.

type Target = <T as FromUriParam<Path, A>>::Target

The resulting type of this conversion.

pub fn from_uri_param(param: A) -> <Option<T> as FromUriParam<Path, A>>::Target

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<A, E, T> FromUriParam<Path, A> for Result<T, E> where
    T: FromUriParam<Path, A>, 

A no cost conversion allowing T to be used in place of an Result<T, E>.

type Target = <T as FromUriParam<Path, A>>::Target

The resulting type of this conversion.

pub fn from_uri_param(
    param: A
) -> <Result<T, E> as FromUriParam<Path, A>>::Target

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl<'a> FromUriParam<Path, PathBuf> for &'a Path

type Target = PathBuf

The resulting type of this conversion.

pub fn from_uri_param(param: PathBuf) -> PathBuf

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl FromUriParam<Path, PathBuf> for PathBuf

type Target = PathBuf

The resulting type of this conversion.

pub fn from_uri_param(param: PathBuf) -> PathBuf

Converts a value of type T into a value of type Self::Target. The resulting value of type Self::Target will be rendered into a URI using its UriDisplay implementation. Read more

impl Part for Path

pub const KIND: Kind

pub const DELIMITER: char

type Raw = Indexed<'static, str>

impl UriDisplay<Path> for PathBuf

Percent-encodes each segment in the path and normalizes separators.

pub fn fmt(&self, f: &mut Formatter<'_, Path>) -> Result<(), Error>

Formats self in a URI-safe manner using the given formatter.

impl UriDisplay<Path> for Path

Percent-encodes each segment in the path and normalizes separators.

pub fn fmt(&self, f: &mut Formatter<'_, Path>) -> Result<(), Error>

Formats self in a URI-safe manner using the given formatter.

impl Copy for Path

Auto Trait Implementations

impl RefUnwindSafe for Path

impl Send for Path

impl Sync for Path

impl Unpin for Path

impl UnwindSafe for Path

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> IntoCollection<T> for 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
    F: FnMut(T) -> U,
    A: Array<Item = U>, 

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.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

pub fn vzip(self) -> V