pub struct RepositoryDescriptor { /* private fields */ }Expand description
The versioned capability descriptor a durable adapter publishes.
Negotiation reads this descriptor before a launch does any durable work, so a requirement the deployed adapter does not declare is rejected up front rather than discovered part-way through an execution. The descriptor is the adapter’s own claim about the deployment it is connected to; it is not derived from the compiled plan and never weakens a declared guarantee.
descriptor_version versions the shape of this declaration. It is distinct
from schema_version, which is the durable metadata schema the adapter is
connected to: a runtime can understand a descriptor whose schema it refuses.
Implementations§
Source§impl RepositoryDescriptor
impl RepositoryDescriptor
Sourcepub const CURRENT_VERSION: u32 = 1
pub const CURRENT_VERSION: u32 = 1
The descriptor shape this runtime publishes and understands.
Sourcepub fn new(
schema_version: u32,
capabilities: impl IntoIterator<Item = RepositoryCapability>,
) -> Self
pub fn new( schema_version: u32, capabilities: impl IntoIterator<Item = RepositoryCapability>, ) -> Self
Declares the capabilities an adapter connected to schema_version
provides.
A capability that is absent is undeclared, which negotiation treats as unavailable. Declaring nothing is the conservative claim, not a permissive one.
Sourcepub const fn descriptor_version(&self) -> u32
pub const fn descriptor_version(&self) -> u32
Returns the version of this descriptor’s shape.
Sourcepub const fn schema_version(&self) -> u32
pub const fn schema_version(&self) -> u32
Returns the durable metadata schema version the adapter is connected to.
Sourcepub fn declares(&self, capability: RepositoryCapability) -> bool
pub fn declares(&self, capability: RepositoryCapability) -> bool
Reports whether the adapter declared capability.
Sourcepub fn capabilities(
&self,
) -> impl ExactSizeIterator<Item = RepositoryCapability> + '_
pub fn capabilities( &self, ) -> impl ExactSizeIterator<Item = RepositoryCapability> + '_
Lists the declared capabilities in a stable order.
Sourcepub fn require(
&self,
capability: RepositoryCapability,
) -> Result<(), RepositoryError>
pub fn require( &self, capability: RepositoryCapability, ) -> Result<(), RepositoryError>
Requires capability, failing with a typed rejection when undeclared.
§Errors
Returns RepositoryError::UnsupportedCapability naming the
requirement. The requirement is never silently downgraded to a weaker
guarantee.
Trait Implementations§
Source§impl Clone for RepositoryDescriptor
impl Clone for RepositoryDescriptor
Source§fn clone(&self) -> RepositoryDescriptor
fn clone(&self) -> RepositoryDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more