pub struct EffectInterfaceMetadata {
pub interface_name: String,
pub operation_name: String,
pub authority_class: EffectAuthorityClass,
pub semantic_class: EffectSemanticClass,
pub agreement_use: EffectAgreementUse,
pub region_scope: EffectRegionScope,
pub admissibility: EffectAdmissibility,
pub totality: EffectTotality,
pub timeout_policy: EffectTimeoutPolicy,
pub retry_shape: EffectRetryShape,
pub reentrancy_policy: EffectReentrancyPolicy,
pub handler_domain: EffectHandlerDomain,
}Expand description
Runtime metadata for one effect interface operation.
Fields§
§interface_name: StringNominal effect interface name.
operation_name: StringNominal effect operation name.
Authority class for this operation.
semantic_class: EffectSemanticClassSemantic class for this operation.
agreement_use: EffectAgreementUseAgreement-use discipline for this operation.
region_scope: EffectRegionScopeRegion scope for this operation.
admissibility: EffectAdmissibilityAdmission policy for this operation.
totality: EffectTotalityTotality contract for this operation.
timeout_policy: EffectTimeoutPolicyTimeout contract for this operation.
retry_shape: EffectRetryShapeRetry shape for this operation.
reentrancy_policy: EffectReentrancyPolicyReentrancy policy for this operation.
handler_domain: EffectHandlerDomainHandler domain expected to interpret this operation.
Implementations§
Source§impl EffectInterfaceMetadata
impl EffectInterfaceMetadata
Whether the effect is authoritative.
Sourcepub fn is_command(&self) -> bool
pub fn is_command(&self) -> bool
Whether the effect is a command surface.
Sourcepub fn is_observe(&self) -> bool
pub fn is_observe(&self) -> bool
Whether the effect is observational.
Sourcepub fn is_immediate(&self) -> bool
pub fn is_immediate(&self) -> bool
Whether the effect must complete immediately.
Sourcepub fn timeout_required(&self) -> bool
pub fn timeout_required(&self) -> bool
Whether the effect requires an explicit timeout contract.
Sourcepub fn has_explicit_retry_rule(&self) -> bool
pub fn has_explicit_retry_rule(&self) -> bool
Whether the effect declares an explicit retry rule.
Sourcepub fn architecturally_legal(&self) -> bool
pub fn architecturally_legal(&self) -> bool
Whether the metadata combination is architecturally legal.
Sourcepub fn immediate_admissible(&self) -> bool
pub fn immediate_admissible(&self) -> bool
Whether an immediate effect is admissible on the semantic path.
Sourcepub fn reentrancy_admissible(
&self,
active: &EffectResponsibilityDomain,
incoming: &EffectResponsibilityDomain,
) -> bool
pub fn reentrancy_admissible( &self, active: &EffectResponsibilityDomain, incoming: &EffectResponsibilityDomain, ) -> bool
Whether one incoming request is admissible relative to one active request.
Sourcepub fn validate(&self) -> Result<(), EffectFailure>
pub fn validate(&self) -> Result<(), EffectFailure>
Validate one metadata combination.
§Errors
Returns a contract error when the metadata encodes an illegal combination.
Sourcepub fn for_effect_kind(effect_kind: &str) -> Self
pub fn for_effect_kind(effect_kind: &str) -> Self
Default runtime metadata for one built-in effect kind.
Trait Implementations§
Source§impl Clone for EffectInterfaceMetadata
impl Clone for EffectInterfaceMetadata
Source§fn clone(&self) -> EffectInterfaceMetadata
fn clone(&self) -> EffectInterfaceMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more