poem_openapi::types

Trait ParseFromParameter

Source
pub trait ParseFromParameter: Sized + Type {
    // Required method
    fn parse_from_parameter(value: &str) -> ParseResult<Self>;

    // Provided method
    fn parse_from_parameters<I: IntoIterator<Item = A>, A: AsRef<str>>(
        iter: I,
    ) -> ParseResult<Self> { ... }
}
Expand description

Represents a type that can parsing from parameter. (header, query, path, cookie)

Required Methods§

Source

fn parse_from_parameter(value: &str) -> ParseResult<Self>

Parse from parameter.

Provided Methods§

Source

fn parse_from_parameters<I: IntoIterator<Item = A>, A: AsRef<str>>( iter: I, ) -> ParseResult<Self>

Parse from multiple parameters.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ParseFromParameter for IpAddr

Source§

impl ParseFromParameter for IpNet

Source§

impl ParseFromParameter for bool

Source§

impl ParseFromParameter for char

Source§

impl ParseFromParameter for f32

Source§

impl ParseFromParameter for f64

Source§

impl ParseFromParameter for i8

Source§

impl ParseFromParameter for i16

Source§

impl ParseFromParameter for i32

Source§

impl ParseFromParameter for i64

Source§

impl ParseFromParameter for u8

Source§

impl ParseFromParameter for u16

Source§

impl ParseFromParameter for u32

Source§

impl ParseFromParameter for u64

Source§

impl ParseFromParameter for usize

Source§

impl ParseFromParameter for String

Source§

impl ParseFromParameter for Ipv4Addr

Source§

impl ParseFromParameter for Ipv6Addr

Source§

impl ParseFromParameter for Duration

Source§

impl ParseFromParameter for ObjectId

Source§

impl ParseFromParameter for DateTime<FixedOffset>

Source§

impl ParseFromParameter for DateTime<Local>

Source§

impl ParseFromParameter for DateTime<Utc>

Source§

impl ParseFromParameter for NaiveDate

Source§

impl ParseFromParameter for NaiveDateTime

Source§

impl ParseFromParameter for NaiveTime

Source§

impl ParseFromParameter for Uri

Source§

impl ParseFromParameter for Duration

Source§

impl ParseFromParameter for Ipv4Net

Source§

impl ParseFromParameter for Ipv6Net

Source§

impl ParseFromParameter for Regex

Source§

impl ParseFromParameter for Decimal

Source§

impl ParseFromParameter for Date

Source§

impl ParseFromParameter for OffsetDateTime

Source§

impl ParseFromParameter for PrimitiveDateTime

Source§

impl ParseFromParameter for Time

Source§

impl ParseFromParameter for Url

Source§

impl ParseFromParameter for Uuid

Source§

impl<T: ParseFromParameter + Ord> ParseFromParameter for BTreeSet<T>

Source§

fn parse_from_parameter(_value: &str) -> ParseResult<Self>

Source§

fn parse_from_parameters<I: IntoIterator<Item = A>, A: AsRef<str>>( iter: I, ) -> ParseResult<Self>

Source§

impl<T: ParseFromParameter + Hash + Eq, R: Send + Sync + Default + BuildHasher> ParseFromParameter for HashSet<T, R>

Source§

fn parse_from_parameter(_value: &str) -> ParseResult<Self>

Source§

fn parse_from_parameters<I: IntoIterator<Item = A>, A: AsRef<str>>( iter: I, ) -> ParseResult<Self>

Source§

impl<T: ParseFromParameter> ParseFromParameter for Option<T>

Source§

fn parse_from_parameter(_value: &str) -> ParseResult<Self>

Source§

fn parse_from_parameters<I: IntoIterator<Item = A>, A: AsRef<str>>( iter: I, ) -> ParseResult<Self>

Source§

impl<T: ParseFromParameter> ParseFromParameter for Box<T>

Source§

fn parse_from_parameter(_value: &str) -> ParseResult<Self>

Source§

fn parse_from_parameters<I: IntoIterator<Item = A>, A: AsRef<str>>( iter: I, ) -> ParseResult<Self>

Source§

impl<T: ParseFromParameter> ParseFromParameter for Arc<T>

Source§

fn parse_from_parameter(_value: &str) -> ParseResult<Self>

Source§

fn parse_from_parameters<I: IntoIterator<Item = A>, A: AsRef<str>>( iter: I, ) -> ParseResult<Self>

Source§

impl<T: ParseFromParameter> ParseFromParameter for Vec<T>

Source§

fn parse_from_parameter(_value: &str) -> ParseResult<Self>

Source§

fn parse_from_parameters<I: IntoIterator<Item = A>, A: AsRef<str>>( iter: I, ) -> ParseResult<Self>

Source§

impl<T: ParseFromParameter, const LEN: usize> ParseFromParameter for [T; LEN]

Source§

fn parse_from_parameter(_value: &str) -> ParseResult<Self>

Source§

fn parse_from_parameters<I: IntoIterator<Item = A>, A: AsRef<str>>( iter: I, ) -> ParseResult<Self>

Implementors§