pub enum MetadataPolarityFormat {
Legacy,
RequiredOptIn,
}Expand description
The metadata-field polarity generation of a sealed package —
decided by the presence of the package’s format marker
(schema-format.json), never by heuristics over the document body.
Under the pre-flip language an absent required/optional key
meant required; under the current language absence means
optional. The two are syntactically indistinguishable, so an
unmarked sealed package reads with Self::Legacy semantics —
its effective behaviour conserved — while packages sealed from
this change on carry the marker and read as
Self::RequiredOptIn. Directory (authoring) loads are always
RequiredOptIn: the author writes against the current language.
Variants§
Legacy
Pre-flip sealed content: an absent key means required.
RequiredOptIn
Current language: an absent key means optional.
Trait Implementations§
Source§impl Clone for MetadataPolarityFormat
impl Clone for MetadataPolarityFormat
Source§fn clone(&self) -> MetadataPolarityFormat
fn clone(&self) -> MetadataPolarityFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MetadataPolarityFormat
Source§impl Debug for MetadataPolarityFormat
impl Debug for MetadataPolarityFormat
impl Eq for MetadataPolarityFormat
Source§impl PartialEq for MetadataPolarityFormat
impl PartialEq for MetadataPolarityFormat
impl StructuralPartialEq for MetadataPolarityFormat
Auto Trait Implementations§
impl Freeze for MetadataPolarityFormat
impl RefUnwindSafe for MetadataPolarityFormat
impl Send for MetadataPolarityFormat
impl Sync for MetadataPolarityFormat
impl Unpin for MetadataPolarityFormat
impl UnsafeUnpin for MetadataPolarityFormat
impl UnwindSafe for MetadataPolarityFormat
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<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
Compare self to
key and return true if they are equal.