pub trait PeopleStore: Send + Sync {
Show 15 methods
// Provided methods
fn upsert_person<'life0, 'life1, 'async_trait>(
&'life0 self,
_person: &'life1 Person,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_person<'life0, 'async_trait>(
&'life0 self,
_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<Person>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_person_by_platform_id<'life0, 'life1, 'async_trait>(
&'life0 self,
_platform_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Person>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn find_person_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Person>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_all_people<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Person>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn delete_person<'life0, 'async_trait>(
&'life0 self,
_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn link_platform_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_person_id: i64,
_platform_id: &'life1 str,
_display_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn touch_person_interaction<'life0, 'async_trait>(
&'life0 self,
_person_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn upsert_person_fact<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_person_id: i64,
_category: &'life1 str,
_key: &'life2 str,
_value: &'life3 str,
_source: &'life4 str,
_confidence: f32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait { ... }
fn get_person_facts<'life0, 'life1, 'async_trait>(
&'life0 self,
_person_id: i64,
_category: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<PersonFact>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn delete_person_fact<'life0, 'async_trait>(
&'life0 self,
_fact_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn confirm_person_fact<'life0, 'async_trait>(
&'life0 self,
_fact_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_people_with_upcoming_dates<'life0, 'async_trait>(
&'life0 self,
_within_days: i32,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Person, PersonFact)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn prune_stale_person_facts<'life0, 'async_trait>(
&'life0 self,
_retention_days: u32,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_people_needing_reconnect<'life0, 'async_trait>(
&'life0 self,
_inactive_days: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<Person>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
People persistence (social graph).
Provided Methods§
Sourcefn upsert_person<'life0, 'life1, 'async_trait>(
&'life0 self,
_person: &'life1 Person,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upsert_person<'life0, 'life1, 'async_trait>(
&'life0 self,
_person: &'life1 Person,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create or update a person record. Returns the person ID.
Sourcefn get_person<'life0, 'async_trait>(
&'life0 self,
_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<Person>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_person<'life0, 'async_trait>(
&'life0 self,
_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<Person>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a person by their database ID.
Sourcefn get_person_by_platform_id<'life0, 'life1, 'async_trait>(
&'life0 self,
_platform_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Person>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_person_by_platform_id<'life0, 'life1, 'async_trait>(
&'life0 self,
_platform_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Person>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Look up a person by a platform-qualified sender ID (e.g., “slack:U123”).
Sourcefn find_person_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Person>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_person_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Person>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find a person by name or alias (case-insensitive).
Sourcefn get_all_people<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Person>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_people<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Person>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all people.
Sourcefn delete_person<'life0, 'async_trait>(
&'life0 self,
_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_person<'life0, 'async_trait>(
&'life0 self,
_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete a person and all their facts (cascade).
Sourcefn link_platform_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_person_id: i64,
_platform_id: &'life1 str,
_display_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn link_platform_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_person_id: i64,
_platform_id: &'life1 str,
_display_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Link a platform identity to a person.
Sourcefn touch_person_interaction<'life0, 'async_trait>(
&'life0 self,
_person_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn touch_person_interaction<'life0, 'async_trait>(
&'life0 self,
_person_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update interaction tracking for a person.
Sourcefn upsert_person_fact<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_person_id: i64,
_category: &'life1 str,
_key: &'life2 str,
_value: &'life3 str,
_source: &'life4 str,
_confidence: f32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn upsert_person_fact<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_person_id: i64,
_category: &'life1 str,
_key: &'life2 str,
_value: &'life3 str,
_source: &'life4 str,
_confidence: f32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Create or update a fact about a person.
Sourcefn get_person_facts<'life0, 'life1, 'async_trait>(
&'life0 self,
_person_id: i64,
_category: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<PersonFact>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_person_facts<'life0, 'life1, 'async_trait>(
&'life0 self,
_person_id: i64,
_category: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<PersonFact>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get facts about a person, optionally filtered by category.
Sourcefn delete_person_fact<'life0, 'async_trait>(
&'life0 self,
_fact_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_person_fact<'life0, 'async_trait>(
&'life0 self,
_fact_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete a person fact by ID.
Sourcefn confirm_person_fact<'life0, 'async_trait>(
&'life0 self,
_fact_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn confirm_person_fact<'life0, 'async_trait>(
&'life0 self,
_fact_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Confirm an auto-extracted person fact (set confidence to 1.0).
Sourcefn get_people_with_upcoming_dates<'life0, 'async_trait>(
&'life0 self,
_within_days: i32,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Person, PersonFact)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_people_with_upcoming_dates<'life0, 'async_trait>(
&'life0 self,
_within_days: i32,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Person, PersonFact)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get people with upcoming dates (birthdays, important dates) within N days.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".