pub trait FromQuery {
    // Required method
    fn from_query(query: &str) -> Self;
}
Expand description

Something that can be created from an entire query string.

This trait needs to be implemented if you want to turn a query string into a struct.

A working example can be found in the examples folder in the root package under query_segments_demo.

Required Methods§

source

fn from_query(query: &str) -> Self

Create an instance of Self from a query string.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: for<'a> From<&'a str>> FromQuery for T