pub fn allow_origins<I>(mut self, origins: I) -> Self
    where
        I: IntoIterator,
        I::Item: IntoOrigin,
    {
        let iter = origins
            .into_iter()
            .map(IntoOrigin::into_origin)
            .map(|origin| {
                origin
                    .to_string()
                    .parse()
                    .expect("cors: Origin is always a valid HeaderValue")
            });

        self.origins.get_or_insert_with(HashSet::new).extend(iter);
        self
    }
/// Add multiple origins to the existing list of allowed `Origin`s.
///
/// # Panics
///
/// Panics if the provided argument is not a valid `Origin`.
Add multiple origins to the existing list of allowed `Origin`s.
Add multiple origins to the existing list of allowed ` Origin ` s .
pub fn allow_origins<I>(mut self, origins: I) -> Self
    where
        I: IntoIterator,
        I::Item: IntoOrigin,
    {
        let iter = origins
            .into_iter()
            .map(IntoOrigin::into_origin)
            .map(|origin| {
                origin
                    .to_string()
                    .parse()
                    .expect("cors: Origin is always a valid HeaderValue")
            });
        self.origins.get_or_insert_with(HashSet::new).extend(iter);
        self
    }
pub fn allow_origins < I > ( mut self , origins : I ) -> Self where I : IntoIterator , I :: Item : IntoOrigin , { let iter = origins . into_iter ( ) . map ( IntoOrigin :: into_origin ) . map ( | origin | { origin . to_string ( ) . parse ( ) . expect ( " " ) } ) ; self . origins . get_or_insert_with ( HashSet :: new ) . extend ( iter ) ; self }
Add multiple origins to the existing list of allowed `Origin`s.
Add multiple origins to the existing list of allowed ` Origin ` s .
mut self
origins
I
mut self
origins
I
panics
Panics if the provided argument is not a valid `Origin`.
Panics if the provided argument is not a valid ` Origin ` .