Trait actix_web::dev::FromParam[][src]

pub trait FromParam: Sized {
    type Err: ResponseError;
    fn from_param(s: &str) -> Result<Self, Self::Err>;
}

A trait to abstract the idea of creating a new instance of a type from a path parameter.

Associated Types

The associated error which can be returned from parsing.

Required Methods

Parses a string s to return a value of this type.

Implementations on Foreign Types

impl FromParam for PathBuf
[src]

Creates a PathBuf from a path parameter. The returned PathBuf is percent-decoded. If a segment is equal to "..", the previous segment (if any) is skipped.

For security purposes, if a segment meets any of the following conditions, an Err is returned indicating the condition met:

As a result of these conditions, a PathBuf parsed from request path parameter is safe to interpolate within, or use as a suffix of, a path without additional checks.

impl FromParam for u8
[src]

impl FromParam for u16
[src]

impl FromParam for u32
[src]

impl FromParam for u64
[src]

impl FromParam for usize
[src]

impl FromParam for i8
[src]

impl FromParam for i16
[src]

impl FromParam for i32
[src]

impl FromParam for i64
[src]

impl FromParam for isize
[src]

impl FromParam for f32
[src]

impl FromParam for f64
[src]

impl FromParam for String
[src]

impl FromParam for IpAddr
[src]

impl FromParam for Ipv4Addr
[src]

impl FromParam for Ipv6Addr
[src]

impl FromParam for SocketAddr
[src]

impl FromParam for SocketAddrV4
[src]

impl FromParam for SocketAddrV6
[src]

Implementors