Expand description
A library of common utilities used by cmc and related tools.
To manually regenerate reference documentation from doc comments in
this file, see the instructions at:
tools/lib/reference_doc/macro/derive-reference-doc-tests/src/test_data/README.md
Re-exports§
pub use crate::types::capability::Capability;pub use crate::types::capability::CapabilityFromRef;pub use crate::types::capability::SpannedCapability;pub use crate::types::capability_id::CapabilityId;pub use crate::types::child::Child;pub use crate::types::child::SpannedChild;pub use crate::types::collection::Collection;pub use crate::types::document::Document;pub use crate::types::document::SpannedDocument;pub use crate::types::environment::Environment;pub use crate::types::environment::ResolverRegistration;pub use crate::types::expose::Expose;pub use crate::types::expose::SpannedExpose;pub use crate::types::offer::Offer;pub use crate::types::offer::OfferFromRef;pub use crate::types::offer::OfferToRef;pub use crate::types::offer::SpannedOffer;pub use crate::types::program::Program;pub use crate::types::use::SpannedUse;pub use crate::types::use::Use;pub use crate::types::use::UseFromRef;pub use crate::one_or_many::OneOrMany;pub use crate::translate::CompileOptions;pub use crate::translate::compile;
Modules§
Structs§
- Bounded
Name - A
BoundedNameis aNamethat can have a max length ofNbytes. - Capability
Requirements - Config
Key - Dictionary
Ref - A reference to a (possibly nested) dictionary.
- Handle
Type - We can’t link the fuchsia-runtime crate because it’s target side only, but we don’t really
need to – its HandleType is pretty much just a thin wrapper over
u8. - Namespace
Path - NamespacePath is the same as Path but accepts
"/"(which is also a valid namespace path). - OneOr
Many Event Scope - Generates deserializer for
OneOrMany<EventScope>. - OneOr
Many Names - Generates deserializer for
OneOrMany<Name>. - OneOr
Many Paths - Generates deserializer for
OneOrMany<Path>. - Path
- A path type used throughout Component Framework, along with its variants NamespacePath and RelativePath. Examples of use:
- Relative
Path - Same as Path except the path does not begin with
/. - Url
- A component URL. The URL is validated, but represented as a string to avoid normalization and retain the original representation.
Enums§
- Allowed
Offers - The kinds of offers that can target components in a given collection. See
AllowedOffers. - AnyRef
- 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.
- Availability
- Capability availability. See
Availability. - Config
Nested Value Type - Config
Runtime Source - Config
Type - Config
Value Type - Delivery
Type - Specifies when the framework will open the protocol from the provider
component’s outgoing directory when someone requests the capability. See
DeliveryType. - Dependency
Type - Offered dependency type. See
DependencyType. - Durability
- The duration of child components in a collection. See
Durability. - Event
Scope - The scope of an event.
- Must
UseRequirement - Offer
ToAll Capability - OnTerminate
- A component instance’s recovery policy. See
OnTerminate. - Parse
Error - The error representing a failure to parse a type from string.
- Root
Dictionary Ref - A reference to a root dictionary.
- Source
Availability - A reference in an
offer to. - Startup
Mode - A component instance’s startup mode. See
StartupMode. - Storage
Id
Traits§
Functions§
- alias_
or_ name - alias_
or_ path - byte_
index_ to_ location - format_
cml - offer_
to_ all_ and_ component_ diff_ capabilities_ message - offer_
to_ all_ and_ component_ diff_ sources_ message - offer_
to_ all_ would_ duplicate - Returns
Ok(true)if desugaring theoffer_to_allusingnameduplicatesspecific_offer. ReturnsOk(false)if not a duplicate. - parse_
many_ documents - Parses a string
bufferinto a vector of Document.fileis used for error reporting. Supports JSON encoded as an array of Document JSON objects. - parse_
one_ document - Parses a string
bufferinto a Document.fileis used for error reporting. - parse_
one_ document_ with_ span - Parses a string
bufferinto a SpannedDocument.fileis used for error reporting.
Type Aliases§
- Borrowed
Name - Unowned variant of
Name.Namefor more details. - Name
- A name that can refer to a component, collection, or other entity in the
Component Manifest. Its length is bounded to
MAX_NAME_LENGTH.