pub struct AssociationStore { /* private fields */ }Expand description
Manages cross-galaxy associations in the Associations galaxy.
Implementations§
Source§impl AssociationStore
impl AssociationStore
Sourcepub fn open(env: &Environment) -> Result<Self>
pub fn open(env: &Environment) -> Result<Self>
Open the association store from an LMDB environment.
Sourcepub fn put(&self, env: &Environment, assoc: &Association) -> Result<()>
pub fn put(&self, env: &Environment, assoc: &Association) -> Result<()>
Create or update an association.
Sourcepub fn get(
&self,
env: &Environment,
source: Uuid,
target: Uuid,
) -> Result<Option<Association>>
pub fn get( &self, env: &Environment, source: Uuid, target: Uuid, ) -> Result<Option<Association>>
Get an association between two specific memories.
Sourcepub fn delete(
&self,
env: &Environment,
source: Uuid,
target: Uuid,
) -> Result<bool>
pub fn delete( &self, env: &Environment, source: Uuid, target: Uuid, ) -> Result<bool>
Delete an association.
Sourcepub fn find_from(
&self,
env: &Environment,
source: Uuid,
) -> Result<Vec<Association>>
pub fn find_from( &self, env: &Environment, source: Uuid, ) -> Result<Vec<Association>>
Find all associations where the given UUID is the source.
Sourcepub fn find_to(
&self,
env: &Environment,
target: Uuid,
) -> Result<Vec<Association>>
pub fn find_to( &self, env: &Environment, target: Uuid, ) -> Result<Vec<Association>>
Find all associations where the given UUID is the target.
Sourcepub fn traverse_cross_galaxy(
&self,
env: &Environment,
store: &MemoryStore,
seed_id: Uuid,
min_weight: f32,
) -> Result<Vec<(Association, Galaxy, Memory)>>
pub fn traverse_cross_galaxy( &self, env: &Environment, store: &MemoryStore, seed_id: Uuid, min_weight: f32, ) -> Result<Vec<(Association, Galaxy, Memory)>>
Traverse cross-galaxy associations starting from a seed memory ID (S9 traversal).
Walks association edges (outgoing and incoming) with weight >= min_weight,
resolving each neighbor across galaxies via store.find_across_galaxies().
Sourcepub fn count(&self, env: &Environment) -> Result<usize>
pub fn count(&self, env: &Environment) -> Result<usize>
Count all associations.
Sourcepub fn find_cycles(&self, env: &Environment) -> Result<Vec<(Uuid, Uuid)>>
pub fn find_cycles(&self, env: &Environment) -> Result<Vec<(Uuid, Uuid)>>
Find all direct circular associations (A→B and B→A both exist).
Circular links can artificially inflate importance in retention calculations. This method scans all associations and returns pairs of UUIDs where both directions exist, allowing the retention engine to avoid double-counting.
Auto Trait Implementations§
impl Freeze for AssociationStore
impl RefUnwindSafe for AssociationStore
impl Send for AssociationStore
impl Sync for AssociationStore
impl Unpin for AssociationStore
impl UnsafeUnpin for AssociationStore
impl UnwindSafe for AssociationStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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> ⓘ
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