Skip to main content

ToQueryParams

Trait ToQueryParams 

Source
pub trait ToQueryParams {
    // Required method
    fn to_query_params(&self) -> Vec<(String, String)>;

    // Provided method
    fn to_url_query(&self) -> String { ... }
}
Expand description

Trait for converting options to URL query parameters.

Required Methods§

Source

fn to_query_params(&self) -> Vec<(String, String)>

Returns a list of key-value pairs for the URL query string.

Provided Methods§

Source

fn to_url_query(&self) -> String

Returns a URL-encoded query string.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§