pub struct Capabilities { /* private fields */ }
Expand description
Capabilities of LeafNode
s.
struct {
ProtocolVersion versions<V>;
CipherSuite ciphersuites<V>;
ExtensionType extensions<V>;
ProposalType proposals<V>;
CredentialType credentials<V>;
} Capabilities;
Implementations§
Source§impl Capabilities
impl Capabilities
Sourcepub fn new(
versions: Option<&[ProtocolVersion]>,
ciphersuites: Option<&[Ciphersuite]>,
extensions: Option<&[ExtensionType]>,
proposals: Option<&[ProposalType]>,
credentials: Option<&[CredentialType]>,
) -> Self
pub fn new( versions: Option<&[ProtocolVersion]>, ciphersuites: Option<&[Ciphersuite]>, extensions: Option<&[ExtensionType]>, proposals: Option<&[ProposalType]>, credentials: Option<&[CredentialType]>, ) -> Self
Create a new Capabilities
struct with the given configuration.
Any argument that is None
is filled with the default values from the
global configuration.
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Create new empty Capabilities
.
Sourcepub fn builder() -> CapabilitiesBuilder
pub fn builder() -> CapabilitiesBuilder
Creates a new CapabilitiesBuilder
for constructing Capabilities
Sourcepub fn versions(&self) -> &[ProtocolVersion]
pub fn versions(&self) -> &[ProtocolVersion]
Get a reference to the list of versions in this extension.
Sourcepub fn ciphersuites(&self) -> &[VerifiableCiphersuite]
pub fn ciphersuites(&self) -> &[VerifiableCiphersuite]
Get a reference to the list of ciphersuites in this extension.
Sourcepub fn extensions(&self) -> &[ExtensionType]
pub fn extensions(&self) -> &[ExtensionType]
Get a reference to the list of supported extensions.
Sourcepub fn proposals(&self) -> &[ProposalType]
pub fn proposals(&self) -> &[ProposalType]
Get a reference to the list of supported proposals.
Sourcepub fn credentials(&self) -> &[CredentialType]
pub fn credentials(&self) -> &[CredentialType]
Get a reference to the list of supported credential types.
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Source§fn clone(&self) -> Capabilities
fn clone(&self) -> Capabilities
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Capabilities
impl Debug for Capabilities
Source§impl Default for Capabilities
impl Default for Capabilities
Source§impl<'de> Deserialize<'de> for Capabilities
impl<'de> Deserialize<'de> for Capabilities
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Deserialize for Capabilities
impl Deserialize for Capabilities
Source§fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
This function deserializes the
bytes
from the provided a std::io::Read
and returns the populated struct. Read moreSource§impl DeserializeBytes for Capabilities
impl DeserializeBytes for Capabilities
Source§impl PartialEq for Capabilities
impl PartialEq for Capabilities
Source§impl Serialize for &Capabilities
impl Serialize for &Capabilities
Source§impl Serialize for Capabilities
impl Serialize for Capabilities
Source§impl Serialize for Capabilities
impl Serialize for Capabilities
Source§impl Size for &Capabilities
impl Size for &Capabilities
fn tls_serialized_len(&self) -> usize
Source§impl Size for Capabilities
impl Size for Capabilities
fn tls_serialized_len(&self) -> usize
impl Eq for Capabilities
impl StructuralPartialEq for Capabilities
Auto Trait Implementations§
impl Freeze for Capabilities
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnwindSafe for Capabilities
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more