Crate cml

source ·
Expand description

A library of common utilities used by cmc and related tools.


pub use crate::one_or_many::OneOrMany;
pub use crate::translate::compile;



Component manifest (.cml) reference
A list of event modes.
Generates deserializer for OneOrMany<UseFromRef>.
Generates deserializer for OneOrMany<ExposeFromRef>.
Generates deserializer for OneOrMany<Name>.
Generates deserializer for OneOrMany<OfferFromRef>.
Generates deserializer for OneOrMany<OfferToRef>.
Generates deserializer for OneOrMany<Path>.
A filesystem path.
A relative filesystem path.
A list of rights.
The stop timeout configured in an environment.
A component URL. The URL is validated, but represented as a string to avoid normalization and retain the original representation.


The kinds of offers that can target components in a given collection. See AllowedOffers.
A relative reference to another object. This is a generic type that can encode any supported reference subtype. For named references, it holds a reference to the name instead of the name itself.
Capability availability. See Availability.
A reference in a storage from.
A name/identity of a capability exposed/offered to another component.
Offered dependency type. See DependencyType.
The duration of child components in a collection. See Durability.
A reference in an environment.
The scope of an event.
A reference in an expose from.
A reference in an expose to.
A reference in an offer from.
A reference in an offer to.
A component instance’s recovery policy. See OnTerminate.
The error representing a failure to parse a type from string.
A reference in an environment registration.
A right or bundle of rights to apply to a directory.
A reference in an offer to.
A component instance’s startup mode. See StartupMode.
A reference in a use from.



Returns Ok(true) if desugaring the offer_to_all using name duplicates specific_offer. Returns Ok(false) if not a duplicate.

Type Definitions

A name that can refer to a component, collection, or other entity in the Component Manifest. Its length is bounded to MAX_NAME_LENGTH.