pub enum KeepExtension {
Must(ExtensionType),
Optional(ExtensionType),
OrDefault(ExtensionType, ClientExtension),
}
Expand description
KeepExtension
gives fine-grained control over the inclusion of extensions originally generated by Rustls.
It dictates whether to keep certain Rustls extensions, use them optionally, or provide a default if unavailable.
Variants§
Must(ExtensionType)
Specifies that the ExtensionType
must be provided by Rustls. If the extension is not present, there might be a configuration or implementation error.
Optional(ExtensionType)
Specifies that the ExtensionType
may be provided by Rustls. Its absence will not be considered
an error.
OrDefault(ExtensionType, ClientExtension)
Specifies that the ExtensionType
should be provided by Rustls; if it is not available,
the specified ClientExtension
will be used as a fallback.
Trait Implementations§
Source§impl Clone for KeepExtension
impl Clone for KeepExtension
Source§fn clone(&self) -> KeepExtension
fn clone(&self) -> KeepExtension
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for KeepExtension
impl RefUnwindSafe for KeepExtension
impl Send for KeepExtension
impl Sync for KeepExtension
impl Unpin for KeepExtension
impl UnwindSafe for KeepExtension
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