Enum rocket_http::uri::fmt::Path
source · 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§
source§impl<'a, 'b> FromUriParam<Path, &'a &'b str> for PathBuf
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
.
source§fn from_uri_param(param: &'a &'b str) -> &'b Path
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.source§impl<'a> FromUriParam<Path, &'a Path> for &'a Path
impl<'a> FromUriParam<Path, &'a Path> for &'a Path
source§fn from_uri_param(param: &'a Path) -> &'a Path
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.source§impl<'a> FromUriParam<Path, &'a Path> for PathBuf
impl<'a> FromUriParam<Path, &'a Path> for PathBuf
source§fn from_uri_param(param: &'a Path) -> &'a Path
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.source§impl<'a> FromUriParam<Path, &'a str> for PathBuf
impl<'a> FromUriParam<Path, &'a str> for PathBuf
A no cost conversion allowing an &str
to be used in place of a PathBuf
.
source§fn from_uri_param(param: &'a str) -> &'a Path
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.source§impl<'x, 'a> FromUriParam<Path, &'x &'a Path> for &'a Path
impl<'x, 'a> FromUriParam<Path, &'x &'a Path> for &'a Path
source§fn from_uri_param(param: &'x &'a Path) -> &'x &'a Path
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.source§impl<'x, 'a> FromUriParam<Path, &'x &'a Path> for PathBuf
impl<'x, 'a> FromUriParam<Path, &'x &'a Path> for PathBuf
source§fn from_uri_param(param: &'x &'a Path) -> &'x &'a Path
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.source§impl<'x, 'a> FromUriParam<Path, &'x PathBuf> for &'a Path
impl<'x, 'a> FromUriParam<Path, &'x PathBuf> for &'a Path
source§fn from_uri_param(param: &'x PathBuf) -> &'x PathBuf
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.source§impl<'x> FromUriParam<Path, &'x PathBuf> for PathBuf
impl<'x> FromUriParam<Path, &'x PathBuf> for PathBuf
source§fn from_uri_param(param: &'x PathBuf) -> &'x PathBuf
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.source§impl<'x, 'a> FromUriParam<Path, &'x mut &'a Path> for &'a Path
impl<'x, 'a> FromUriParam<Path, &'x mut &'a Path> for &'a Path
source§fn from_uri_param(param: &'x mut &'a Path) -> &'x mut &'a Path
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.source§impl<'x, 'a> FromUriParam<Path, &'x mut &'a Path> for PathBuf
impl<'x, 'a> FromUriParam<Path, &'x mut &'a Path> for PathBuf
source§fn from_uri_param(param: &'x mut &'a Path) -> &'x mut &'a Path
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.source§impl<'x, 'a> FromUriParam<Path, &'x mut PathBuf> for &'a Path
impl<'x, 'a> FromUriParam<Path, &'x mut PathBuf> for &'a Path
source§fn from_uri_param(param: &'x mut PathBuf) -> &'x mut PathBuf
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.source§impl<'x> FromUriParam<Path, &'x mut PathBuf> for PathBuf
impl<'x> FromUriParam<Path, &'x mut PathBuf> for PathBuf
source§fn from_uri_param(param: &'x mut PathBuf) -> &'x mut PathBuf
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.source§impl<A, T: FromUriParam<Path, A>> FromUriParam<Path, A> for Option<T>
impl<A, T: FromUriParam<Path, A>> FromUriParam<Path, A> for Option<T>
A no cost conversion allowing any T
to be used in place of an Option<T>
.
§type Target = <T as FromUriParam<Path, A>>::Target
type Target = <T as FromUriParam<Path, A>>::Target
The resulting type of this conversion.
source§fn from_uri_param(param: A) -> Self::Target
fn from_uri_param(param: A) -> Self::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.source§impl<A, E, T: FromUriParam<Path, A>> FromUriParam<Path, A> for Result<T, E>
impl<A, E, T: FromUriParam<Path, A>> FromUriParam<Path, A> for Result<T, E>
A no cost conversion allowing T
to be used in place of an Result<T, E>
.
§type Target = <T as FromUriParam<Path, A>>::Target
type Target = <T as FromUriParam<Path, A>>::Target
The resulting type of this conversion.
source§fn from_uri_param(param: A) -> Self::Target
fn from_uri_param(param: A) -> Self::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.source§impl<'a> FromUriParam<Path, PathBuf> for &'a Path
impl<'a> FromUriParam<Path, PathBuf> for &'a Path
source§fn from_uri_param(param: PathBuf) -> PathBuf
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.source§impl FromUriParam<Path, PathBuf> for PathBuf
impl FromUriParam<Path, PathBuf> for PathBuf
source§fn from_uri_param(param: PathBuf) -> PathBuf
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.source§impl UriDisplay<Path> for Path
impl UriDisplay<Path> for Path
Percent-encodes each segment in the path and normalizes separators.
source§impl UriDisplay<Path> for PathBuf
impl UriDisplay<Path> for PathBuf
Percent-encodes each segment in the path and normalizes separators.