Enum rustls::SupportedCipherSuite
source · [−]pub enum SupportedCipherSuite {
Tls12(&'static Tls12CipherSuite),
Tls13(&'static Tls13CipherSuite),
}
Expand description
A cipher suite supported by rustls.
All possible instances of this type are provided by the library in
the ALL_CIPHER_SUITES
array.
Variants
Tls12(&'static Tls12CipherSuite)
A TLS 1.2 cipher suite
Tls13(&'static Tls13CipherSuite)
A TLS 1.3 cipher suite
Implementations
sourceimpl SupportedCipherSuite
impl SupportedCipherSuite
sourcepub fn hash_algorithm(&self) -> &'static Algorithm
pub fn hash_algorithm(&self) -> &'static Algorithm
Which hash function to use with this suite.
sourcepub fn suite(&self) -> CipherSuite
pub fn suite(&self) -> CipherSuite
The cipher suite’s identifier
sourcepub fn version(&self) -> &'static SupportedProtocolVersion
pub fn version(&self) -> &'static SupportedProtocolVersion
Return supported protocol version for the cipher suite.
sourcepub fn usable_for_signature_algorithm(
&self,
_sig_alg: SignatureAlgorithm
) -> bool
pub fn usable_for_signature_algorithm(
&self,
_sig_alg: SignatureAlgorithm
) -> bool
Return true if this suite is usable for a key only offering sig_alg
signatures. This resolves to true for all TLS1.3 suites.
Trait Implementations
sourceimpl Clone for SupportedCipherSuite
impl Clone for SupportedCipherSuite
sourcefn clone(&self) -> SupportedCipherSuite
fn clone(&self) -> SupportedCipherSuite
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SupportedCipherSuite
impl Debug for SupportedCipherSuite
sourceimpl From<&'static Tls12CipherSuite> for SupportedCipherSuite
impl From<&'static Tls12CipherSuite> for SupportedCipherSuite
sourcefn from(s: &'static Tls12CipherSuite) -> Self
fn from(s: &'static Tls12CipherSuite) -> Self
Performs the conversion.
sourceimpl From<&'static Tls13CipherSuite> for SupportedCipherSuite
impl From<&'static Tls13CipherSuite> for SupportedCipherSuite
sourcefn from(s: &'static Tls13CipherSuite) -> Self
fn from(s: &'static Tls13CipherSuite) -> Self
Performs the conversion.
sourceimpl PartialEq<SupportedCipherSuite> for SupportedCipherSuite
impl PartialEq<SupportedCipherSuite> for SupportedCipherSuite
sourcefn eq(&self, other: &SupportedCipherSuite) -> bool
fn eq(&self, other: &SupportedCipherSuite) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SupportedCipherSuite) -> bool
fn ne(&self, other: &SupportedCipherSuite) -> bool
This method tests for !=
.
impl Copy for SupportedCipherSuite
impl StructuralPartialEq for SupportedCipherSuite
Auto Trait Implementations
impl !RefUnwindSafe for SupportedCipherSuite
impl Send for SupportedCipherSuite
impl Sync for SupportedCipherSuite
impl Unpin for SupportedCipherSuite
impl !UnwindSafe for SupportedCipherSuite
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more