pub struct ProximityMap<S: Store> { /* private fields */ }Expand description
Immutable exact-key directory plus deterministic ANN hierarchy.
Implementations§
Source§impl<S> ProximityMap<S>
impl<S> ProximityMap<S>
Sourcepub fn build(
store: S,
config: ProximityConfig,
records: impl IntoIterator<Item = ProximityRecord>,
) -> Result<Self, Error>
pub fn build( store: S, config: ProximityConfig, records: impl IntoIterator<Item = ProximityRecord>, ) -> Result<Self, Error>
Build a canonical proximity map from logical records.
Sourcepub fn build_with_parallelism(
store: S,
config: ProximityConfig,
records: impl IntoIterator<Item = ProximityRecord>,
parallelism: BuildParallelism,
) -> Result<(Self, ProximityBuildStats), Error>
pub fn build_with_parallelism( store: S, config: ProximityConfig, records: impl IntoIterator<Item = ProximityRecord>, parallelism: BuildParallelism, ) -> Result<(Self, ProximityBuildStats), Error>
Build with an explicit runtime worker limit and canonical logical stats.
Sourcepub fn load(store: S, descriptor_cid: Cid) -> Result<Self, Error>
pub fn load(store: S, descriptor_cid: Cid) -> Result<Self, Error>
Load and locally validate a persisted proximity descriptor.
Sourcepub fn tree(&self) -> &ProximityTree
pub fn tree(&self) -> &ProximityTree
The immutable roots and shape configuration committed by this map.
Sourcepub fn clear_content_cache(&self) -> Result<(), Error>
pub fn clear_content_cache(&self) -> Result<(), Error>
Invalidate process-local decoded proximity objects after an external content sweep. This does not mutate or remove persisted content.
Sourcepub fn get(&self, key: &[u8]) -> Result<Option<ExactProximityRecord>, Error>
pub fn get(&self, key: &[u8]) -> Result<Option<ExactProximityRecord>, Error>
Exact key lookup through the authoritative ordered directory.
Sourcepub fn contains_key(&self, key: &[u8]) -> Result<bool, Error>
pub fn contains_key(&self, key: &[u8]) -> Result<bool, Error>
Exact key membership through the authoritative ordered directory.
Sourcepub fn rebuild_batch(
&self,
mutations: impl IntoIterator<Item = ProximityMutation>,
) -> Result<Self, Error>
pub fn rebuild_batch( &self, mutations: impl IntoIterator<Item = ProximityMutation>, ) -> Result<Self, Error>
Canonical full rebuild after applying a sorted-unique logical mutation batch.
Sourcepub fn mutate_batch(
&self,
mutations: impl IntoIterator<Item = ProximityMutation>,
) -> Result<(Self, ProximityMutationStats), Error>
pub fn mutate_batch( &self, mutations: impl IntoIterator<Item = ProximityMutation>, ) -> Result<(Self, ProximityMutationStats), Error>
Copy-on-write mutation with exact clean-rebuild CID equivalence.
Sourcepub fn search(&self, request: SearchRequest<'_>) -> Result<SearchResult, Error>
pub fn search(&self, request: SearchRequest<'_>) -> Result<SearchResult, Error>
Deterministic global best-first search over the authoritative hierarchy.
Sourcepub fn verify(&self) -> Result<ProximityVerification, Error>
pub fn verify(&self) -> Result<ProximityVerification, Error>
Traverse and validate the descriptor, directory, hierarchy, and routing invariants.
Source§impl<S> ProximityMap<S>
impl<S> ProximityMap<S>
Sourcepub fn prove_membership(
&self,
key: &[u8],
) -> Result<ProximityMembershipProof, Error>
pub fn prove_membership( &self, key: &[u8], ) -> Result<ProximityMembershipProof, Error>
Prove exact presence or absence without requiring the verifier’s store.
Source§impl<S> ProximityMap<S>
impl<S> ProximityMap<S>
Sourcepub fn prove_search(
&self,
request: SearchRequest<'_>,
limits: &ContentGraphLimits,
) -> Result<ProximitySearchProof, Error>
pub fn prove_search( &self, request: SearchRequest<'_>, limits: &ContentGraphLimits, ) -> Result<ProximitySearchProof, Error>
Prove deterministic native execution. Auto is allowed when it resolves to the native map; explicit accelerator requests use their sidecars.
Source§impl<S> ProximityMap<S>
impl<S> ProximityMap<S>
Sourcepub fn prove_structure(
&self,
limits: &ContentGraphLimits,
) -> Result<ProximityStructuralProof, Error>
pub fn prove_structure( &self, limits: &ContentGraphLimits, ) -> Result<ProximityStructuralProof, Error>
Capture the authenticated typed closure of this immutable snapshot.
Auto Trait Implementations§
impl<S> !Freeze for ProximityMap<S>
impl<S> RefUnwindSafe for ProximityMap<S>where
S: RefUnwindSafe,
impl<S> Send for ProximityMap<S>
impl<S> Sync for ProximityMap<S>
impl<S> Unpin for ProximityMap<S>where
S: Unpin,
impl<S> UnsafeUnpin for ProximityMap<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for ProximityMap<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more