Skip to main content
This is unreleased documentation for Yew Next version.
For up-to-date documentation, see the latest version on docs.rs.

ToQuery

Trait ToQuery 

pub trait ToQuery {
    type Error;

    // Required method
    fn to_query(&self) -> Result<Cow<'_, str>, Self::Error>;
}
Expand description

Type that can be encoded into a query string.

Required Associated Types§

type Error

Error that can be returned from the conversion.

Required Methods§

fn to_query(&self) -> Result<Cow<'_, str>, Self::Error>

Method to encode the query into a string.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

§

impl<T> ToQuery for Raw<T>
where T: AsRef<str>,

§

impl<T> ToQuery for T
where T: Serialize,