pub fn new<N: Into<String>, S: IntoIterator<Item = I>, I: Into<String>>(
        name: N,
        scopes: S,
    ) -> Self {
        Self {
            value: HashMap::from_iter(iter::once_with(|| {
                (
                    Into::<String>::into(name),
                    scopes
                        .into_iter()
                        .map(|scope| Into::<String>::into(scope))
                        .collect::<Vec<_>>(),
                )
            })),
        }
    }
/// Construct a new [`SecurityRequirement`]
///
/// Accepts name for the security requirement which must match to the name of available [`SecurityScheme`].
/// Second parameter is [`IntoIterator`] of [`Into<String>`] scopes needed by the [`SecurityRequirement`].
/// Scopes must match to the ones defined in [`SecurityScheme`].
///
/// # Examples
///
/// Create new security requirement with scopes.
/// ```rust
/// # use utoipa::openapi::security::SecurityRequirement;
/// SecurityRequirement::new("api_oauth2_flow", ["edit:items", "read:items"]);
/// ```
///
/// You can also create an empty security requirement with `Default::default()`.
/// ```rust
/// # use utoipa::openapi::security::SecurityRequirement;
/// SecurityRequirement::default();
/// ```
Construct a new [`SecurityRequirement`]
Accepts name for the security requirement which must match to the name of available [`SecurityScheme`].
Construct a new [ ` SecurityRequirement ` ] Accepts name for the security requirement which must match to the name of available [ ` SecurityScheme ` ] .
pub fn new<N: Into<String>, S: IntoIterator<Item = I>, I: Into<String>>(
        name: N,
        scopes: S,
    ) -> Self {
        Self {
            value: HashMap::from_iter(iter::once_with(|| {
                (
                    Into::<String>::into(name),
                    scopes
                        .into_iter()
                        .map(|scope| Into::<String>::into(scope))
                        .collect::<Vec<_>>(),
                )
            })),
        }
    }
pub fn new < N : Into < String > , S : IntoIterator < Item = I > , I : Into < String > > ( name : N , scopes : S , ) -> Self { Self { value : HashMap :: from_iter ( iter :: once_with ( | | { ( Into :: < String > :: into ( name ) , scopes . into_iter ( ) . map ( | scope | Into :: < String > :: into ( scope ) ) . collect :: < Vec < _ > > ( ) , ) } ) ) , } }
Construct a new [`SecurityRequirement`]
Accepts name for the security requirement which must match to the name of available [`SecurityScheme`].
Construct a new [ ` SecurityRequirement ` ] Accepts name for the security requirement which must match to the name of available [ ` SecurityScheme ` ] .
name
N
scopes
S
examples
Create new security requirement with scopes.
Create new security requirement with scopes .
use utoipa::openapi::security::securityrequirement;


You can also create an empty security requirement with `Default::default()`.
You can also create an empty security requirement with ` Default :: default () ` .
use utoipa::openapi::security::securityrequirement;
None