Skip to main content

HyphaeEngine

Struct HyphaeEngine 

Source
pub struct HyphaeEngine { /* private fields */ }
Expand description

Embeddable autonomous Hyphae engine.

Implementations§

Source§

impl HyphaeEngine

Source

pub fn open(path: impl AsRef<Path>) -> Result<OpenedEngine, EngineError>

Opens one exclusively owned data directory and completes recovery.

§Errors

Returns an error for directory contention, corruption, unsupported formats, snapshot mismatch, or failed index replay.

Source

pub fn data_path(&self) -> &Path

Returns the owned data-directory path.

Source

pub fn put_record( &mut self, transaction_id: Uuid, record: &Record, ) -> Result<AppendOutcome, EngineError>

Atomically stores one canonical structured record.

§Errors

Returns a document codec or durable storage error.

Source

pub fn put_records( &mut self, transaction_id: Uuid, records: &[Record], ) -> Result<AppendOutcome, EngineError>

Atomically stores a batch of canonical structured records.

Encoding every document and checking duplicate keys happens before the log append, so a codec failure cannot partially commit the batch.

§Errors

Returns an error for duplicate batch keys, document bounds, key bounds, idempotency conflicts, or durable storage failures.

Source

pub fn delete_record( &mut self, transaction_id: Uuid, key: &[u8], ) -> Result<AppendOutcome, EngineError>

Atomically deletes one structured record.

§Errors

Returns a key-validation, idempotency, or durable storage error.

Source

pub fn delete_records( &mut self, transaction_id: Uuid, keys: &[&[u8]], ) -> Result<AppendOutcome, EngineError>

Atomically deletes a batch of structured records.

Duplicate keys are rejected before the log append. Deleting a missing key remains a successful durable operation.

§Errors

Returns an error for duplicate keys, invalid key bounds, idempotency conflicts, or durable storage failures.

Source

pub fn get_record(&self, key: &[u8]) -> Result<Option<Record>, EngineError>

Gets and verifies one structured record by binary key.

§Errors

Returns a key, storage, or canonical document verification error.

Source

pub fn get_record_with_proof( &self, key: &[u8], ) -> Result<ResultProofArtifact, EngineError>

Gets one structured record and binds the complete result, including absence, to a canonical snapshot witness.

§Errors

Returns a key, storage, document, snapshot, or result-proof error.

Source

pub fn query( &self, query: &Query, limits: &ExecutionLimits, ) -> Result<QueryResult, EngineError>

Executes deterministic structured query over all durable documents.

Storage scan and document decoding consume the same wall-clock timeout; the reference executor receives only the remaining duration.

§Errors

Returns a storage, document, query validation, global budget, aggregate, or timeout error. No partial page is returned.

Source

pub fn query_with_proof( &self, query: &Query, limits: &ExecutionLimits, ) -> Result<ResultProofArtifact, EngineError>

Executes one structured query and binds its complete logical result to a canonical snapshot witness at the same locked checkpoint.

§Errors

Returns any ordinary query error plus snapshot or proof creation failures. No proof is returned for a partial or failed query.

Source

pub fn retrieve_vectors( shards: &[&[VectorRecord]], request: &RetrievalRequest, limits: &RetrievalLimits, ) -> Result<RetrievalOutcome, EngineError>

Executes exact provider-neutral vector retrieval without persisting or producing embeddings.

§Errors

Returns vector, shape, duplicate-key, budget, or timeout errors.

Source

pub fn snapshot(&self) -> Result<SnapshotInfo, EngineError>

Creates or reuses a verified logical snapshot.

§Errors

Returns a stale-handle, index, or snapshot error.

Source

pub fn compact(&mut self) -> Result<CompactionOutcome, EngineError>

Commits an anchored compaction generation.

§Errors

Returns a stale-handle, snapshot, segment, or manifest error.

Source

pub fn backup( &self, destination: impl AsRef<Path>, ) -> Result<BackupInfo, EngineError>

Creates an atomic portable backup at the locked logical checkpoint.

§Errors

Returns a snapshot, destination, synchronization, or promotion error.

Source

pub fn verify_backup(path: impl AsRef<Path>) -> Result<BackupInfo, EngineError>

Verifies a portable backup without opening a live data directory.

§Errors

Returns an error for a malformed layout, metadata mismatch, or corrupt snapshot.

Source

pub fn restore_backup( backup: impl AsRef<Path>, destination: impl AsRef<Path>, ) -> Result<RestoreInfo, EngineError>

Restores a backup to a new atomically activated data directory.

§Errors

Returns an error before destination activation if verification, index reconstruction, reopen, or filesystem synchronization fails.

Trait Implementations§

Source§

impl Debug for HyphaeEngine

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.