FilterParameter

Trait FilterParameter 

Source
pub trait FilterParameter<'map, 'elem: 'map>: Sealed {
    type Argument: FilterArgument<'map, 'elem>;

    // Required methods
    fn is_array() -> bool;
    fn is_optional() -> bool;
    fn get_from_map(map: &'map Map<'elem>, key: &str) -> Self;
}
Expand description

An internal trait representing a filter parameter type (argument type + whether it’s an array or optional).

Required Associated Types§

Source

type Argument: FilterArgument<'map, 'elem>

The underlying argument type for this parameter type.

Required Methods§

Source

fn is_array() -> bool

Returns whether this parameter is an array.

Source

fn is_optional() -> bool

Returns whether this parameter is optional.

Source

fn get_from_map(map: &'map Map<'elem>, key: &str) -> Self

Retrieves this parameter from the given map.

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<'map, 'elem: 'map, T> FilterParameter<'map, 'elem> for Option<ValueIter<'map, 'elem, T>>
where T: FilterArgument<'map, 'elem>,

Source§

type Argument = T

Source§

fn is_array() -> bool

Source§

fn is_optional() -> bool

Source§

fn get_from_map(map: &'map Map<'elem>, key: &str) -> Self

Source§

impl<'map, 'elem: 'map, T> FilterParameter<'map, 'elem> for Option<T>
where T: FilterArgument<'map, 'elem>,

Source§

type Argument = T

Source§

fn is_array() -> bool

Source§

fn is_optional() -> bool

Source§

fn get_from_map(map: &'map Map<'elem>, key: &str) -> Self

Implementors§

Source§

impl<'map, 'elem: 'map, T> FilterParameter<'map, 'elem> for ValueIter<'map, 'elem, T>
where T: FilterArgument<'map, 'elem>,

Source§

impl<'map, 'elem: 'map, T> FilterParameter<'map, 'elem> for T
where T: FilterArgument<'map, 'elem>,