pub struct StandardsMetadata {
pub targets: BTreeMap<String, TargetStandards>,
}Expand description
The standards table for one package version: the declared
per-target interface requirement table plus the per-target flags
index consumers need. Keyed by library-like target name in a
BTreeMap for deterministic, sorted output. An empty table is
the same as absence: everything unconstrained.
Fields§
§targets: BTreeMap<String, TargetStandards>Per-target rows, keyed by target name. cabin publish writes
one entry per library-like target of the version (library and
header-only kinds); executables, tests, and examples never
constrain consumers and are omitted.
Implementations§
Source§impl StandardsMetadata
impl StandardsMetadata
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether the table carries no rows. An empty table is omitted from the serialized index entry (absence = unconstrained).
Sourcepub fn version_wide_join(&self) -> EffectiveRequirements
pub fn version_wide_join(&self) -> EffectiveRequirements
The version-wide effective requirement: per language, the join
(spec D4) over every published target row’s declared interface
requirement. An absent or all-unconstrained table joins to
unconstrained.
This is the candidate-version requirement that preference mode
checks a consumer against when it lacks per-edge target scoping
(the version-wide fallback described in section 1 of
docs/design/standard-compatibility/preference-mode.md). It can
only over-constrain (a stricter extras target the consumer
never links still counts), which is a preference-only lossiness
the post-resolution validation corrects.
Sourcepub fn from_package(package: &Package) -> Self
pub fn from_package(package: &Package) -> Self
Derive the declared per-target table from a resolved package.
Every library-like target gets a row - even one whose
requirements are all unconstrained and whose flags are false
(the target existing and imposing nothing is itself
information). Each cell is the target’s declared ReqOf
(spec D9) for that language, computed through the shared
dependency_attributes mapping so the stored table matches
what the resolver-graph pass evaluates.
Trait Implementations§
Source§impl Clone for StandardsMetadata
impl Clone for StandardsMetadata
Source§fn clone(&self) -> StandardsMetadata
fn clone(&self) -> StandardsMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StandardsMetadata
impl Debug for StandardsMetadata
Source§impl Default for StandardsMetadata
impl Default for StandardsMetadata
Source§fn default() -> StandardsMetadata
fn default() -> StandardsMetadata
Source§impl<'de> Deserialize<'de> for StandardsMetadata
impl<'de> Deserialize<'de> for StandardsMetadata
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Eq for StandardsMetadata
Source§impl PartialEq for StandardsMetadata
impl PartialEq for StandardsMetadata
Source§fn eq(&self, other: &StandardsMetadata) -> bool
fn eq(&self, other: &StandardsMetadata) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for StandardsMetadata
impl Serialize for StandardsMetadata
impl StructuralPartialEq for StandardsMetadata
Auto Trait Implementations§
impl Freeze for StandardsMetadata
impl RefUnwindSafe for StandardsMetadata
impl Send for StandardsMetadata
impl Sync for StandardsMetadata
impl Unpin for StandardsMetadata
impl UnsafeUnpin for StandardsMetadata
impl UnwindSafe for StandardsMetadata
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.