pub struct ExtensionsMap(/* private fields */);Expand description
A map of vendor-namespaced extension values.
Keys SHOULD use a reverse-DNS-style prefix (e.g. vendor.example/feature)
to avoid collisions across implementations. The map preserves insertion
order for stable canonicalization.
Implementations§
Source§impl ExtensionsMap
impl ExtensionsMap
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
True if no extensions are set.
Callers embedding this map in a signed struct MUST wrap the field
as Option<ExtensionsMap> with
#[serde(default, skip_serializing_if = "Option::is_none")], NOT
skip_serializing_if = "ExtensionsMap::is_empty" on a bare
(non-Option) field — the latter conflates an absent extensions
member with a present-but-empty "extensions":{}, which are
different canonical bytes and therefore different signatures
(RFC-AITP-0001 §5.4.1). See docs/jcs.md for the full rationale
and the list of types that follow this pattern. This method exists
for callers that only need to check emptiness directly, not as a
skip_serializing_if target.
Trait Implementations§
Source§impl Clone for ExtensionsMap
impl Clone for ExtensionsMap
Source§impl Debug for ExtensionsMap
impl Debug for ExtensionsMap
Source§impl Default for ExtensionsMap
impl Default for ExtensionsMap
Source§impl<'de> Deserialize<'de> for ExtensionsMap
impl<'de> Deserialize<'de> for ExtensionsMap
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 ExtensionsMap
Source§impl PartialEq for ExtensionsMap
impl PartialEq for ExtensionsMap
Source§impl Serialize for ExtensionsMap
impl Serialize for ExtensionsMap
impl StructuralPartialEq for ExtensionsMap
Auto Trait Implementations§
impl Freeze for ExtensionsMap
impl RefUnwindSafe for ExtensionsMap
impl Send for ExtensionsMap
impl Sync for ExtensionsMap
impl Unpin for ExtensionsMap
impl UnsafeUnpin for ExtensionsMap
impl UnwindSafe for ExtensionsMap
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.