Skip to main content

Contract

Struct Contract 

Source
pub struct Contract {
Show 18 fields pub schema_version: u32, pub status: Status, pub maturity: Maturity, pub ecosystems: Vec<Ecosystem>, pub targets: Vec<Target>, pub versioning: VersioningBase, pub versioning_pattern: Option<String>, pub changelog: Changelog, pub conventional_commits: bool, pub release: Release, pub contribution_provenance: ContributionProvenance, pub provenance_level: ProvenanceLevel, pub dependency_bot: DependencyBot, pub health_badges: Vec<HealthBadge>, pub license: String, pub docs_site: DocsSite, pub extra_fields: Map<String, Value>, pub warnings: Vec<String>,
}
Expand description

The canonical, fully-defaulted, targets-expanded OSS-RELEASE.md contract.

This is the exact shape of SCHEMA.md §4 (the stable machine contract). Every field is present and defaulted; versioning is the base enum with the calver pattern split into Self::versioning_pattern; extra_fields holds preserved unknown frontmatter keys (forward-compat); warnings holds the non-fatal notes. Field order matches SCHEMA.md §4 for readable output; JSON consumers key-access, so order is not part of the contract.

Fields§

§schema_version: u32

Contract schema version (bounded by KNOWN_SCHEMA_VERSION).

§status: Status

Approval gate.

§maturity: Maturity

Maturity dial.

§ecosystems: Vec<Ecosystem>

Packaging ecosystems, de-duplicated to canonical order.

§targets: Vec<Target>

Concrete publish targets (expanded from ecosystems when omitted).

§versioning: VersioningBase

Base versioning scheme.

§versioning_pattern: Option<String>

The calver pattern string, or null for non-calver schemes.

§changelog: Changelog

Changelog configuration.

§conventional_commits: bool

Whether /oss-release-cut may derive the bump from commit types.

§release: Release

Release model + layout.

§contribution_provenance: ContributionProvenance

Contributor sign-off requirement.

§provenance_level: ProvenanceLevel

Build-provenance level.

§dependency_bot: DependencyBot

Dependency-update bot.

§health_badges: Vec<HealthBadge>

README health badges.

§license: String

SPDX license id/expression.

§docs_site: DocsSite

Optional documentation-site generator.

§extra_fields: Map<String, Value>

Preserved unknown frontmatter keys under a known schema_version (forward-compat); never dropped.

§warnings: Vec<String>

Non-fatal notes (aspirational draft producers, the unknown-field report).

Trait Implementations§

Source§

impl Clone for Contract

Source§

fn clone(&self) -> Contract

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Contract

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Contract

Source§

fn eq(&self, other: &Contract) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Contract

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Contract

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.