pub enum CapabilitiesPolicy {
Reject,
Widen,
}Expand description
How a leaf’s capabilities are treated when they don’t already cover what the leaf being built needs.
There is deliberately no Default: which policy applies depends on
whether the caller set capabilities at all, so every call site resolves it
through resolve_capabilities rather than falling back on its own.
Variants§
Reject
Reject construction unless the given capabilities already cover the leaf’s own ciphersuite, credential type and extension types, and the group’s required capabilities.
Widen
Add whatever the leaf itself uses — its ciphersuite, credential type and extension types, plus the extension types of the KeyPackage the leaf is built for — and reject only if the group’s required capabilities are still unmet. Never removes anything the caller set.
Note that this widens only capabilities the library can derive from the leaf. It never claims support for the group’s required extension, proposal or credential types on its own, and it cannot cover the cross-member credential checks a group applies on receipt. Therefore, a widened leaf is not automatically an acceptable one.
Trait Implementations§
Source§impl Clone for CapabilitiesPolicy
impl Clone for CapabilitiesPolicy
impl Copy for CapabilitiesPolicy
Source§impl Debug for CapabilitiesPolicy
impl Debug for CapabilitiesPolicy
Source§impl<'de> Deserialize<'de> for CapabilitiesPolicy
impl<'de> Deserialize<'de> for CapabilitiesPolicy
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>,
impl Eq for CapabilitiesPolicy
Source§impl PartialEq for CapabilitiesPolicy
impl PartialEq for CapabilitiesPolicy
Source§impl Serialize for CapabilitiesPolicy
impl Serialize for CapabilitiesPolicy
impl StructuralPartialEq for CapabilitiesPolicy
Auto Trait Implementations§
impl Freeze for CapabilitiesPolicy
impl RefUnwindSafe for CapabilitiesPolicy
impl Send for CapabilitiesPolicy
impl Sync for CapabilitiesPolicy
impl Unpin for CapabilitiesPolicy
impl UnsafeUnpin for CapabilitiesPolicy
impl UnwindSafe for CapabilitiesPolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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