poem_openapi::types

Trait ParseFromJSON

Source
pub trait ParseFromJSON: Sized + Type {
    // Required method
    fn parse_from_json(value: Option<Value>) -> ParseResult<Self>;

    // Provided method
    fn parse_from_json_string(s: &str) -> ParseResult<Self> { ... }
}
Expand description

Represents a type that can parsing from JSON.

Required Methods§

Provided Methods§

Source

fn parse_from_json_string(s: &str) -> ParseResult<Self>

Parse from JSON string.

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 ParseFromJSON for IpAddr

Source§

impl ParseFromJSON for IpNet

Source§

impl ParseFromJSON for Value

Source§

impl ParseFromJSON for bool

Source§

impl ParseFromJSON for char

Source§

impl ParseFromJSON for f32

Source§

impl ParseFromJSON for f64

Source§

impl ParseFromJSON for i8

Source§

impl ParseFromJSON for i16

Source§

impl ParseFromJSON for i32

Source§

impl ParseFromJSON for i64

Source§

impl ParseFromJSON for u8

Source§

impl ParseFromJSON for u16

Source§

impl ParseFromJSON for u32

Source§

impl ParseFromJSON for u64

Source§

impl ParseFromJSON for usize

Source§

impl ParseFromJSON for String

Source§

impl ParseFromJSON for Ipv4Addr

Source§

impl ParseFromJSON for Ipv6Addr

Source§

impl ParseFromJSON for Duration

Source§

impl ParseFromJSON for ObjectId

Source§

impl ParseFromJSON for DateTime<FixedOffset>

Source§

impl ParseFromJSON for DateTime<Local>

Source§

impl ParseFromJSON for DateTime<Utc>

Source§

impl ParseFromJSON for NaiveDate

Source§

impl ParseFromJSON for NaiveDateTime

Source§

impl ParseFromJSON for NaiveTime

Source§

impl ParseFromJSON for LineString

Source§

impl ParseFromJSON for MultiLineString

Source§

impl ParseFromJSON for MultiPoint

Source§

impl ParseFromJSON for MultiPolygon

Source§

impl ParseFromJSON for Point

Source§

impl ParseFromJSON for Polygon

Source§

impl ParseFromJSON for Uri

Source§

impl ParseFromJSON for Duration

Source§

impl ParseFromJSON for Ipv4Net

Source§

impl ParseFromJSON for Ipv6Net

Source§

impl ParseFromJSON for Struct

Source§

impl ParseFromJSON for Value

Source§

impl ParseFromJSON for Regex

Source§

impl ParseFromJSON for Decimal

Source§

impl ParseFromJSON for Date

Source§

impl ParseFromJSON for OffsetDateTime

Source§

impl ParseFromJSON for PrimitiveDateTime

Source§

impl ParseFromJSON for Time

Source§

impl ParseFromJSON for Url

Source§

impl ParseFromJSON for Uuid

Source§

impl<K, V> ParseFromJSON for BTreeMap<K, V>
where K: ToString + FromStr + Ord + Sync + Send, K::Err: Display, V: ParseFromJSON,

Source§

impl<K, V, R> ParseFromJSON for HashMap<K, V, R>

Source§

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

Source§

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

Source§

impl<T: ParseFromJSON> ParseFromJSON for Option<T>

Source§

impl<T: ParseFromJSON> ParseFromJSON for Box<T>

Source§

impl<T: ParseFromJSON> ParseFromJSON for Arc<T>

Source§

impl<T: ParseFromJSON> ParseFromJSON for Vec<T>

Source§

impl<T: ParseFromJSON> ParseFromJSON for Json<T>

Source§

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

Implementors§