mod compatibility¶
- module compatibility¶
Versioned objective bridge compatibility descriptors. Versioned compatibility descriptors for engine-backed objective bridges.
Variables
- const PROTOCOL_FAMILY: &str¶
Protocol family used by the anneal objective boundary.
Functions
- unsafe fn validate_eindir_objective(objective: *const eindir_objective_t, expected_dim: usize) -> Result<(), CompatibilityError>¶
Validate the memory and numerical shape invariants required by an eindir objective before adapting it to an
eindir_core::Objective.The handle is borrowed and no callback is invoked. Semantic metadata such as units and force sign belongs to the versioned
EngineDescriptorand is validated separately.Safety
objectivemust point to a readableeindir_objective_twhose bound pointers referenceobjective.dimreadablef64values.
Enums
- enum CompatibilityError¶
Reason an engine descriptor cannot be consumed.
- ObjectiveNull¶
The supplied objective handle is null.
- ObjectiveDimension¶
The objective dimension does not match the consumer’s request.
- expected: usize¶
Dimension requested by the consumer.
- received: usize¶
Dimension reported by the handle.
- ObjectiveBoundsNull¶
A required objective bound pointer is null.
- bound: &'static str¶
Bound pointer that is absent.
- ObjectiveBoundsInvalid¶
An objective bound is non-finite or inverted.
- index: usize¶
Coordinate containing the invalid interval.
- lower: String¶
Lower bound rendered for a stable diagnostic.
- upper: String¶
Upper bound rendered for a stable diagnostic.
- AbiMajor¶
The embedded objective ABI major differs.
- expected: u16¶
Consumer-required ABI major revision.
- received: u16¶
Producer-reported ABI major revision.
- AbiMinor¶
The producer is older than the requested additive ABI revision.
- expected: u16¶
Consumer-required ABI minor revision.
- received: u16¶
Producer-reported ABI minor revision.
- ProtocolFamily¶
The producer belongs to another protocol family.
- expected: String¶
Consumer-required family name.
- received: String¶
Producer-reported family name.
- ProtocolMajor¶
The wire protocol major differs.
- expected: u16¶
Consumer-required major revision.
- received: u16¶
Producer-reported major revision.
- ProtocolMinor¶
The producer is older than the requested additive protocol revision.
- expected: u16¶
Consumer-required minor revision.
- received: u16¶
Producer-reported minor revision.
- AbiLayout¶
The embedded objective layout differs.
- expected: u32¶
Consumer-required layout revision.
- received: u32¶
Producer-reported layout revision.
- AbiSize¶
The embedded objective size differs.
- expected: usize¶
Consumer-required handle size.
- received: usize¶
Producer-reported handle size.
- AbiAlignment¶
The embedded objective alignment differs.
- expected: usize¶
Consumer-required handle alignment.
- received: usize¶
Producer-reported handle alignment.
- DlpackMajor¶
The DLPack major differs.
- expected: u16¶
Consumer-required DLPack major revision.
- received: u16¶
Producer-reported DLPack major revision.
Structs and Unions
- struct AbiStamp¶
Native objective bridge metadata shared by eindir-compatible consumers.
- abi_major: u16¶
Major ABI revision for the embedded eindir objective handle.
- abi_minor: u16¶
Additive ABI revision for the embedded eindir objective handle.
- layout_revision: u32¶
ABI layout revision for the embedded objective handle.
- objective_size: usize¶
Size of the embedded objective handle in bytes.
- objective_align: usize¶
Alignment of the embedded objective handle in bytes.
- dlpack_major: u16¶
Major DLPack callback revision.
- dlpack_minor: u16¶
Minor DLPack callback revision.
- features: u64¶
Feature bits required by the consumer.
Implementations
- struct EngineDescriptor¶
Self-description returned by an objective engine or RPC endpoint.
- engine_id: String¶
Stable producer name.
- protocol_family: String¶
Stable protocol family name.
- protocol: ProtocolVersion¶
Protocol spoken by the producer.
- build_identity: Option<String>¶
Optional source or build identity supplied by the producer.
Implementations
- impl EngineDescriptor¶
Functions
- fn new(engine_id: impl Into<String>, protocol: ProtocolVersion, abi: AbiStamp) -> Self¶
Construct a descriptor for a producer.
- fn validate(&self, expected_family: &str, expected_protocol: ProtocolVersion, expected_abi: AbiStamp) -> Result<(), CompatibilityError>¶
Validate a producer against the requested protocol and bridge stamp.
- fn with_family(engine_id: impl Into<String>, protocol_family: impl Into<String>, protocol: ProtocolVersion, abi: AbiStamp) -> Self¶
Construct a descriptor with an explicit protocol family.
Traits implemented
- impl Default for EngineDescriptor¶