pub fn unprocessable_entity<K, V>(errors: impl IntoIterator<Item = (K, V)>) -> Self
        where
            K: Into<Cow<'static, str>>,
            V: Into<Cow<'static, str>>,
    {
        let mut error_map = HashMap::new();

        for (key, val) in errors {
            error_map
                .entry(key.into())
                .or_insert_with(Vec::new)
                .push(val.into());
        }

        Self::UnprocessableEntity { errors: error_map }
    }
/// Convenient constructor for `Error::UnprocessableEntity`.
///
/// Multiple for the same key are collected into a list for that key.
///
/// Try "Go to Usage" in an IDE for examples.

Convenient constructor for `Error::UnprocessableEntity`.
Multiple for the same key are collected into a list for that key.

Try "Go to Usage" in an IDE for examples.
Convenient constructor for ` Error :: UnprocessableEntity ` . Multiple for the same key are collected into a list for that key . Try " Go to Usage " in an IDE for examples .
pub fn unprocessable_entity<K, V>(errors: impl IntoIterator<Item = (K, V)>) -> Self
        where
            K: Into<Cow<'static, str>>,
            V: Into<Cow<'static, str>>,
    {
        let mut error_map = HashMap::new();
        for (key, val) in errors {
            error_map
                .entry(key.into())
                .or_insert_with(Vec::new)
                .push(val.into());
        }
        Self::UnprocessableEntity { errors: error_map }
    }
pub fn unprocessable_entity < K , V > ( errors : impl IntoIterator < Item = ( K , V ) > ) -> Self where K : Into < Cow < ' static , str > > , V : Into < Cow < ' static , str > > , { let mut error_map = HashMap :: new ( ) ; for ( key , val ) in errors { error_map . entry ( key . into ( ) ) . or_insert_with ( Vec :: new ) . push ( val . into ( ) ) ; } Self :: UnprocessableEntity { errors : error_map } }
Convenient constructor for `Error::UnprocessableEntity`.
Convenient constructor for ` Error :: UnprocessableEntity ` .
errors
impl IntoIterator<Item = (K, V)>