pub struct Manifest {
pub spec: String,
pub spec_version: SpecVersion,
pub capabilities: Option<Capabilities>,
pub manifest: ManifestMeta,
pub ports: Vec<Port>,
}Expand description
Canonical manifest representation.
Fields§
§spec: StringIdentifier for this specification (must be fio).
spec_version: SpecVersion§capabilities: Option<Capabilities>Optional conformance capabilities for this manifest.
manifest: ManifestMetaHuman-facing metadata describing the manifest.
ports: Vec<Port>Ordered list of typed ports.
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn from_yaml_reader<R: Read>(reader: R) -> Result<Self, Error>
pub fn from_yaml_reader<R: Read>(reader: R) -> Result<Self, Error>
Construct a manifest by reading YAML from any reader.
Sourcepub fn from_yaml_str(yaml: &str) -> Result<Self, Error>
pub fn from_yaml_str(yaml: &str) -> Result<Self, Error>
Construct a manifest from a YAML string slice.
Sourcepub fn normalize(&mut self)
pub fn normalize(&mut self)
Normalize the manifest in-place for deterministic comparison.
- Ports are sorted lexicographically by id.
- Tags (if any) are sorted and deduplicated.
- Table keys (if any) are sorted and deduplicated.
- Enumerated constraint values are sorted and deduplicated.
Sourcepub fn normalized(self) -> Self
pub fn normalized(self) -> Self
Return a normalized copy of the manifest.
Sourcepub fn effective_profile(&self) -> Profile
pub fn effective_profile(&self) -> Profile
Return the effective conformance profile for this manifest.
When capabilities are omitted, the manifest is treated as core-v0.
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Validate the manifest and return granular issues when invariants fail.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Manifest
impl<'de> Deserialize<'de> for Manifest
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
Source§impl JsonSchema for Manifest
impl JsonSchema for Manifest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnwindSafe for Manifest
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)