/// Set the application-layer protocols to accept, in order of descending preference.
///
/// When set, clients which don't declare support for at least one of the supplied protocols will be rejected.
///
/// The IANA maintains a [registry] of standard protocol IDs, but custom IDs may be used as well.
///
/// [registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
Set the application-layer protocols to accept, in order of descending preference.
When set, clients which don't declare support for at least one of the supplied protocols will be rejected.

The IANA maintains a [registry] of standard protocol IDs, but custom IDs may be used as well.


Set the application - layer protocols to accept in order of descending preference . When set clients which don ' t declare support for at least one of the supplied protocols will be rejected . The IANA maintains a [ registry ] of standard protocol IDs but custom IDs may be used as well .
pub fn protocols(&mut self, protocols: &[&[u8]]) -> &mut Self {
        Arc::make_mut(&mut self.config.crypto).alpn_protocols =
            protocols.iter().map(|x| x.to_vec()).collect();
        self
    }
pub fn protocols ( & mut self , protocols : & [ & [ u8 ] ] ) -> & mut Self { Arc :: make_mut ( & mut self . config . crypto ) . alpn_protocols = protocols . iter ( ) . map ( | x | x . to_vec ( ) ) . collect ( ) ; self }
Set the application-layer protocols to accept, in order of descending preference.
Set the application - layer protocols to accept in order of descending preference .
&mut self
protocols
&[&[u8]]