pub fn allow_methods<I>(mut self, methods: I) -> Self
    where
        I: IntoIterator,
        http::Method: TryFrom<I::Item>,
    {
        let iter = methods.into_iter().map(|m| match TryFrom::try_from(m) {
            Ok(m) => m,
            Err(_) => panic!("cors: illegal method"),
        });
        self.allowed_methods.extend(iter);
        self
    }
/// Adds multiple methods to the existing list of allowed request methods.
///
/// # Panics
///
/// Panics if the provided argument is not a valid `http::Method`.
Adds multiple methods to the existing list of allowed request methods.
Adds multiple methods to the existing list of allowed request methods .
pub fn allow_methods<I>(mut self, methods: I) -> Self
    where
        I: IntoIterator,
        http::Method: TryFrom<I::Item>,
    {
        let iter = methods.into_iter().map(|m| match TryFrom::try_from(m) {
            Ok(m) => m,
            Err(_) => panic!("cors: illegal method"),
        });
        self.allowed_methods.extend(iter);
        self
    }
pub fn allow_methods < I > ( mut self , methods : I ) -> Self where I : IntoIterator , http :: Method : TryFrom < I :: Item > , { let iter = methods . into_iter ( ) . map ( | m | match TryFrom :: try_from ( m ) { Ok ( m ) => m , Err ( _ ) => panic ! ( " " ) , } ) ; self . allowed_methods . extend ( iter ) ; self }
Adds multiple methods to the existing list of allowed request methods.
Adds multiple methods to the existing list of allowed request methods .
mut self
methods
I
mut self
methods
I
panics
Panics if the provided argument is not a valid `http::Method`.
Panics if the provided argument is not a valid ` http :: Method ` .