pub struct Component {
pub program: Option<Program>,
pub uses: Option<Vec<Use>>,
pub exposes: Option<Vec<Expose>>,
pub offers: Option<Vec<Offer>>,
pub capabilities: Option<Vec<Capability>>,
pub children: Option<Vec<Child>>,
pub collections: Option<Vec<Collection>>,
pub environments: Option<Vec<Environment>>,
pub facets: Option<Dictionary>,
pub config: Option<ConfigSchema>,
}
Expand description
A component declaration.
This information is typically encoded in the component manifest (.cm file) if it has one or may be generated at runtime by a component resolver for those that don’t.
Fields§
§program: Option<Program>
§uses: Option<Vec<Use>>
§exposes: Option<Vec<Expose>>
§offers: Option<Vec<Offer>>
§capabilities: Option<Vec<Capability>>
§children: Option<Vec<Child>>
§collections: Option<Vec<Collection>>
§environments: Option<Vec<Environment>>
§facets: Option<Dictionary>
§config: Option<ConfigSchema>
Trait Implementations§
Source§impl Encodable for Component
impl Encodable for Component
Source§type Encoded = WireComponent
type Encoded = WireComponent
The wire type for the value.
§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied directly during
encoding instead of calling
encode
. Read moreSource§impl TakeFrom<WireComponent> for Component
impl TakeFrom<WireComponent> for Component
Source§fn take_from(from: &WireComponent) -> Self
fn take_from(from: &WireComponent) -> Self
Converts from the given
T
, taking any resources that can’t be cloned.§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied directly during
conversion instead of calling
take_from
. Read moreAuto Trait Implementations§
impl Freeze for Component
impl RefUnwindSafe for Component
impl Send for Component
impl Sync for Component
impl Unpin for Component
impl UnwindSafe for Component
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