pub struct ModuleManifestBuilder { /* private fields */ }Expand description
Incrementally constructs a ModuleManifest without fabricating absent facts.
Implementations§
Source§impl ModuleManifestBuilder
impl ModuleManifestBuilder
Sourcepub fn protocol_ver(self, protocol_ver: u8) -> Self
pub fn protocol_ver(self, protocol_ver: u8) -> Self
Overrides the linked protocol version for compatibility fixtures.
Sourcepub fn trust_tier(self, trust_tier: Option<TrustTier>) -> Self
pub fn trust_tier(self, trust_tier: Option<TrustTier>) -> Self
Declares the optional trust tier of this module.
The daemon does not evaluate this field on any production path.
Sourcepub fn ready(self, ready: bool) -> Self
pub fn ready(self, ready: bool) -> Self
Declares whether the module is ready to receive new route binds.
Sourcepub fn provides(self, provides: Vec<ProviderRole>) -> Self
pub fn provides(self, provides: Vec<ProviderRole>) -> Self
Declares the provider roles this module exposes.
Sourcepub fn consumes(self, consumes: Vec<ConsumerRole>) -> Self
pub fn consumes(self, consumes: Vec<ConsumerRole>) -> Self
Declares the consumer roles this module requests.
Sourcepub fn bindings(self, bindings: Option<Bindings>) -> Self
pub fn bindings(self, bindings: Option<Bindings>) -> Self
Declares the optional resource and subsystem bindings of this module.
The daemon does not evaluate this field on any production path.
Sourcepub fn capabilities(self, capabilities: Option<CapabilityDeclarations>) -> Self
pub fn capabilities(self, capabilities: Option<CapabilityDeclarations>) -> Self
Adds optional capability-grammar declarations.
Sourcepub fn events(self, events: Option<Vec<EventDeclaration>>) -> Self
pub fn events(self, events: Option<Vec<EventDeclaration>>) -> Self
Adds optional bus event declarations; an empty list declares no events.
Sourcepub fn self_signals(
self,
self_signals: Option<Vec<SelfSignalDeclaration>>,
) -> Self
pub fn self_signals( self, self_signals: Option<Vec<SelfSignalDeclaration>>, ) -> Self
Adds optional periodic or event-driven behavior declarations.
Sourcepub fn provenance(self, provenance: Option<ManifestProvenance>) -> Self
pub fn provenance(self, provenance: Option<ManifestProvenance>) -> Self
Adds optional build provenance declared by the module.
Sourcepub fn operation_delivery(
self,
operation_delivery: BTreeMap<String, OperationDelivery>,
) -> Self
pub fn operation_delivery( self, operation_delivery: BTreeMap<String, OperationDelivery>, ) -> Self
Sets delivery hints; an empty map preserves the legacy unary wire shape.
Sourcepub fn operation_payload(
self,
operation_payload: BTreeMap<String, OperationPayload>,
) -> Self
pub fn operation_payload( self, operation_payload: BTreeMap<String, OperationPayload>, ) -> Self
Sets raw request payload limits; an empty map preserves legacy wire bytes.
Sourcepub fn flow_operations(self, flow_operations: Option<Vec<String>>) -> Self
pub fn flow_operations(self, flow_operations: Option<Vec<String>>) -> Self
Declares the management operations served to a flow-scoped call.
None (the default) leaves the answer unknown and preserves legacy wire
bytes; Some(vec![]) admits no operation under a flow scope. Check the
result with ModuleManifest::validate_flow_operations, because an
invalid list is dropped when the manifest is decoded.
Sourcepub fn confirm_operations(self, confirm_operations: Option<Vec<String>>) -> Self
pub fn confirm_operations(self, confirm_operations: Option<Vec<String>>) -> Self
Declares the management operations guarded with operator.confirm.
None (the default) leaves the answer unknown and preserves legacy wire
bytes. Check the result with
ModuleManifest::validate_confirm_operations, because an invalid list
is dropped when the manifest is decoded.
Sourcepub fn rich_ui(self, rich_ui: Option<RichUiDescriptor>) -> Self
pub fn rich_ui(self, rich_ui: Option<RichUiDescriptor>) -> Self
Adds an opaque rich-UI manifest descriptor to this module’s manifest.
Sourcepub fn role_declarations(
self,
role_declarations: BTreeMap<String, Map<String, Value>>,
) -> Self
pub fn role_declarations( self, role_declarations: BTreeMap<String, Map<String, Value>>, ) -> Self
Sets opaque declarations owned by each role’s contract.
Sourcepub fn build(self) -> ModuleManifest
pub fn build(self) -> ModuleManifest
Finishes the manifest.