pub trait Delete: DataProvider {
// Required methods
fn delete(
&self,
context: &Self::Context,
gid: &Self::ExternalId,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn release(
&self,
context: &Self::Context,
id: Self::InternalId,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn status_by_internal_id(
&self,
context: &Self::Context,
id: Self::InternalId,
) -> impl Future<Output = Result<ElementStatus, Self::Error>> + Send;
fn status_by_external_id(
&self,
context: &Self::Context,
gid: &Self::ExternalId,
) -> impl Future<Output = Result<ElementStatus, Self::Error>> + Send;
// Provided method
fn statuses_unordered<Itr, F>(
&self,
context: &Self::Context,
itr: Itr,
f: F,
) -> impl Future<Output = Result<(), Self::Error>> + Send
where Itr: Iterator<Item = Self::InternalId> + Send,
F: FnMut(Result<ElementStatus, Self::Error>, Self::InternalId) + Send { ... }
}Required Methods§
Sourcefn delete(
&self,
context: &Self::Context,
gid: &Self::ExternalId,
) -> impl Future<Output = Result<(), Self::Error>> + Send
fn delete( &self, context: &Self::Context, gid: &Self::ExternalId, ) -> impl Future<Output = Result<(), Self::Error>> + Send
Delete an item by external ID.
Note that internal vector IDs may still be reachable. In the context of a graph index, this is equivalent to a “soft” delete where the deleted ID should no longer be returned as the result of search methods, but may still be accessed by its private ID during graph node expansion.
Sourcefn release(
&self,
context: &Self::Context,
id: Self::InternalId,
) -> impl Future<Output = Result<(), Self::Error>> + Send
fn release( &self, context: &Self::Context, id: Self::InternalId, ) -> impl Future<Output = Result<(), Self::Error>> + Send
Release a node by an internal ID.
This is called by the index only when there are no longer any incoming edges to a particular data point.
In particular, the index makes the guarantee that when it invokes release on an
internal ID, it will not try to retrive an element via the same internal ID via
an accessor derived from self until SetElement yields the internal ID.
Sourcefn status_by_internal_id(
&self,
context: &Self::Context,
id: Self::InternalId,
) -> impl Future<Output = Result<ElementStatus, Self::Error>> + Send
fn status_by_internal_id( &self, context: &Self::Context, id: Self::InternalId, ) -> impl Future<Output = Result<ElementStatus, Self::Error>> + Send
Check the status via internal ID.
Sourcefn status_by_external_id(
&self,
context: &Self::Context,
gid: &Self::ExternalId,
) -> impl Future<Output = Result<ElementStatus, Self::Error>> + Send
fn status_by_external_id( &self, context: &Self::Context, gid: &Self::ExternalId, ) -> impl Future<Output = Result<ElementStatus, Self::Error>> + Send
Check the status via external ID.
Provided Methods§
Sourcefn statuses_unordered<Itr, F>(
&self,
context: &Self::Context,
itr: Itr,
f: F,
) -> impl Future<Output = Result<(), Self::Error>> + Sendwhere
Itr: Iterator<Item = Self::InternalId> + Send,
F: FnMut(Result<ElementStatus, Self::Error>, Self::InternalId) + Send,
fn statuses_unordered<Itr, F>(
&self,
context: &Self::Context,
itr: Itr,
f: F,
) -> impl Future<Output = Result<(), Self::Error>> + Sendwhere
Itr: Iterator<Item = Self::InternalId> + Send,
F: FnMut(Result<ElementStatus, Self::Error>, Self::InternalId) + Send,
A potentially optimized bulk version of status_by_internal_id.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".