pub struct PgClusterStore { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Clone for PgClusterStore
impl Clone for PgClusterStore
Source§impl ClusterStore for PgClusterStore
impl ClusterStore for PgClusterStore
Source§fn cluster_id_of<'life0, 'life1, 'async_trait>(
&'life0 self,
iri: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ClusterId>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cluster_id_of<'life0, 'life1, 'async_trait>(
&'life0 self,
iri: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ClusterId>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The cluster a sequence IRI belongs to, or
None when it is unclustered.Source§fn cluster_mates<'life0, 'life1, 'async_trait>(
&'life0 self,
iri: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cluster_mates<'life0, 'life1, 'async_trait>(
&'life0 self,
iri: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The other members of
iri’s cluster, excluding iri itself. Empty when
iri is unclustered or the sole member. This is the /similar candidate
set, which the caller then ranks by PageRank. Order is unspecified.Source§fn replace_clusters<'life0, 'async_trait>(
&'life0 self,
pairs: Vec<(String, ClusterId)>,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn replace_clusters<'life0, 'async_trait>(
&'life0 self,
pairs: Vec<(String, ClusterId)>,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Replace every cluster assignment with
pairs in one transaction: after
it returns the table reflects exactly these (sequence_iri, cluster_id)
pairs and nothing prior.Source§fn all_assignments<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, ClusterId)>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn all_assignments<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, ClusterId)>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Every persisted
(sequence_iri, cluster_id) assignment, a full scan of
the cluster table. The ranked-text path builds its cluster-duplicate map
from these, so a non-centroid cluster member is demoted in free-text
search. Order is unspecified.Source§fn assign_cluster<'life0, 'life1, 'async_trait>(
&'life0 self,
iri: &'life1 str,
cluster: ClusterId,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn assign_cluster<'life0, 'life1, 'async_trait>(
&'life0 self,
iri: &'life1 str,
cluster: ClusterId,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Assign one sequence to a cluster, upserting: a later assignment for the
same IRI overwrites the earlier one. This is the incremental write path a
single new sequence takes, sparing the whole-table
replace_clusters a full rebuild runs. Read moreSource§fn max_cluster_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<ClusterId>, DomainError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn max_cluster_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<ClusterId>, DomainError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
The largest cluster id in use, or
None when no sequence is clustered.
The incremental assign path opens a fresh cluster at one past this id. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for PgClusterStore
impl !UnwindSafe for PgClusterStore
impl Freeze for PgClusterStore
impl Send for PgClusterStore
impl Sync for PgClusterStore
impl Unpin for PgClusterStore
impl UnsafeUnpin for PgClusterStore
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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