Trait Param

Source
pub trait Param {
    // Required method
    fn try_as_tuple(&self) -> Result<(String, String), ParamError>;

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

Trait for a single request parameter.

Required Methods§

Source

fn try_as_tuple(&self) -> Result<(String, String), ParamError>

Try to return a tuple of this parameter as a key-value pair.

Provided Methods§

Source

fn as_tuple(&self) -> (String, String)

Return a tuple of this parameter as a key-value pair.

Implementors§