pub struct SupportMatrix {
pub schema_version: u32,
pub artifact: String,
pub reference: MatrixReference,
pub snapshot: MatrixSnapshot,
pub states: BTreeMap<String, String>,
pub categories: Vec<String>,
pub features: Vec<Feature>,
pub summary: MatrixSummary,
}Expand description
The machine-readable support matrix, mirroring
compatibility/support-matrix.json.
Fields§
§schema_version: u32§artifact: String§reference: MatrixReference§snapshot: MatrixSnapshot§states: BTreeMap<String, String>The declared state domain: state name → description.
categories: Vec<String>§features: Vec<Feature>§summary: MatrixSummaryImplementations§
Source§impl SupportMatrix
impl SupportMatrix
Sourcepub fn builtin() -> Result<&'static SupportMatrix, SupportMatrixError>
pub fn builtin() -> Result<&'static SupportMatrix, SupportMatrixError>
The embedded support matrix, parsed once and cached.
An embedded matrix that fails to parse or validate is a build/provenance error in this repository, so this is a hard error rather than a recoverable lookup failure.
Sourcepub fn feature_state(&self, id: &str) -> Option<&str>
pub fn feature_state(&self, id: &str) -> Option<&str>
The support state of a feature id (e.g. planned,
semantic-supported, lowering-dependent).
Sourcepub fn features_by_category(&self, category: &str) -> Vec<&Feature>
pub fn features_by_category(&self, category: &str) -> Vec<&Feature>
Every feature entry of a category (e.g. syntax, semantics).
Sourcepub fn features_by_state(&self, state: &str) -> Vec<&Feature>
pub fn features_by_state(&self, state: &str) -> Vec<&Feature>
Every feature entry in a state (e.g. lowering-dependent).
Sourcepub fn categories(&self) -> &[String]
pub fn categories(&self) -> &[String]
The declared categories.
Sourcepub fn declared_states(&self) -> &BTreeMap<String, String>
pub fn declared_states(&self) -> &BTreeMap<String, String>
The declared state domain (state name → description).
Sourcepub fn summary(&self) -> &MatrixSummary
pub fn summary(&self) -> &MatrixSummary
The feature-count summary by state and category.
Trait Implementations§
Source§impl Clone for SupportMatrix
impl Clone for SupportMatrix
Source§fn clone(&self) -> SupportMatrix
fn clone(&self) -> SupportMatrix
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 moreSource§impl Debug for SupportMatrix
impl Debug for SupportMatrix
Source§impl<'de> Deserialize<'de> for SupportMatrix
impl<'de> Deserialize<'de> for SupportMatrix
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SupportMatrix
Source§impl PartialEq for SupportMatrix
impl PartialEq for SupportMatrix
Source§impl Serialize for SupportMatrix
impl Serialize for SupportMatrix
impl StructuralPartialEq for SupportMatrix
Auto Trait Implementations§
impl Freeze for SupportMatrix
impl RefUnwindSafe for SupportMatrix
impl Send for SupportMatrix
impl Sync for SupportMatrix
impl Unpin for SupportMatrix
impl UnsafeUnpin for SupportMatrix
impl UnwindSafe for SupportMatrix
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