pub struct OptionalParserPackManifest { /* private fields */ }Expand description
One validated logical optional parser-pack accepted-capability manifest.
Implementations§
Source§impl OptionalParserPackManifest
impl OptionalParserPackManifest
Sourcepub fn new(
source: OptionalParserPackSource,
runtime: OptionalParserPackRuntime,
licenses: Vec<GrammarLicense>,
grammars: Vec<AcceptedGrammar>,
) -> Result<Self, OptionalParserPackManifestError>
pub fn new( source: OptionalParserPackSource, runtime: OptionalParserPackRuntime, licenses: Vec<GrammarLicense>, grammars: Vec<AcceptedGrammar>, ) -> Result<Self, OptionalParserPackManifestError>
Construct and seal one logical manifest from sorted accepted records.
§Errors
Returns an error when the records violate any accepted-capability invariant.
Sourcepub const fn schema_version(&self) -> u32
pub const fn schema_version(&self) -> u32
Return the logical manifest schema version.
Sourcepub const fn capability_set_version(&self) -> u32
pub const fn capability_set_version(&self) -> u32
Return the accepted capability-set version.
Sourcepub const fn source(&self) -> &OptionalParserPackSource
pub const fn source(&self) -> &OptionalParserPackSource
Borrow the exact broad-grammar source pin.
Sourcepub const fn runtime(&self) -> &OptionalParserPackRuntime
pub const fn runtime(&self) -> &OptionalParserPackRuntime
Borrow the exact consuming runtime binding.
Sourcepub const fn registry(&self) -> &OptionalParserPackRegistryBinding
pub const fn registry(&self) -> &OptionalParserPackRegistryBinding
Borrow the accepted language-registry binding.
Sourcepub fn required_platforms(&self) -> &[PackPlatform]
pub fn required_platforms(&self) -> &[PackPlatform]
Borrow the complete optional-pack artifact target set.
Sourcepub fn licenses(&self) -> &[GrammarLicense]
pub fn licenses(&self) -> &[GrammarLicense]
Borrow the sorted exact license inventory.
Sourcepub fn grammars(&self) -> &[AcceptedGrammar]
pub fn grammars(&self) -> &[AcceptedGrammar]
Borrow the sorted accepted non-built-in grammar rows.
Sourcepub const fn capability_set_digest(&self) -> &Blake3Digest
pub const fn capability_set_digest(&self) -> &Blake3Digest
Borrow the complete canonical capability-set digest.
Sourcepub fn from_json(bytes: &[u8]) -> Result<Self, OptionalParserPackManifestError>
pub fn from_json(bytes: &[u8]) -> Result<Self, OptionalParserPackManifestError>
Parse and validate one bounded JSON manifest.
§Errors
Returns a typed size, JSON, or domain-validation error.
Sourcepub fn validate(&self) -> Result<(), OptionalParserPackManifestError>
pub fn validate(&self) -> Result<(), OptionalParserPackManifestError>
Validate all local, cross-record, registry, and deterministic digest invariants.
§Errors
Returns the first deterministic invalid field, binding, row, or digest.
Sourcepub fn computed_capability_set_digest(&self) -> Blake3Digest
pub fn computed_capability_set_digest(&self) -> Blake3Digest
Compute the deterministic digest of the complete logical manifest.
Trait Implementations§
Source§impl Clone for OptionalParserPackManifest
impl Clone for OptionalParserPackManifest
Source§fn clone(&self) -> OptionalParserPackManifest
fn clone(&self) -> OptionalParserPackManifest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OptionalParserPackManifest
impl Debug for OptionalParserPackManifest
impl Eq for OptionalParserPackManifest
impl StructuralPartialEq for OptionalParserPackManifest
Auto Trait Implementations§
impl Freeze for OptionalParserPackManifest
impl RefUnwindSafe for OptionalParserPackManifest
impl Send for OptionalParserPackManifest
impl Sync for OptionalParserPackManifest
impl Unpin for OptionalParserPackManifest
impl UnwindSafe for OptionalParserPackManifest
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.