pub trait QueryIdentityUpdates {
// Required methods
fn get_identity_updates<InboxId: AsRef<str>>(
&self,
inbox_id: InboxId,
from_sequence_id: Option<i64>,
to_sequence_id: Option<i64>,
) -> Result<Vec<StoredIdentityUpdate>, ConnectionError>;
fn insert_or_ignore_identity_updates(
&self,
updates: &[StoredIdentityUpdate],
) -> Result<(), ConnectionError>;
fn get_latest_sequence_id_for_inbox(
&self,
inbox_id: &str,
) -> Result<i64, ConnectionError>;
fn get_latest_sequence_id(
&self,
inbox_ids: &[&str],
) -> Result<HashMap<String, i64>, ConnectionError>;
fn count_inbox_updates(
&self,
inbox_ids: &[&str],
) -> Result<HashMap<String, i64>, ConnectionError>;
}Required Methods§
Sourcefn get_identity_updates<InboxId: AsRef<str>>(
&self,
inbox_id: InboxId,
from_sequence_id: Option<i64>,
to_sequence_id: Option<i64>,
) -> Result<Vec<StoredIdentityUpdate>, ConnectionError>
fn get_identity_updates<InboxId: AsRef<str>>( &self, inbox_id: InboxId, from_sequence_id: Option<i64>, to_sequence_id: Option<i64>, ) -> Result<Vec<StoredIdentityUpdate>, ConnectionError>
Returns all identity updates for the given inbox ID up to the provided sequence_id.
Returns updates greater than from_sequence_id and less than or equal to to_sequence_id
Sourcefn insert_or_ignore_identity_updates(
&self,
updates: &[StoredIdentityUpdate],
) -> Result<(), ConnectionError>
fn insert_or_ignore_identity_updates( &self, updates: &[StoredIdentityUpdate], ) -> Result<(), ConnectionError>
Batch insert identity updates, ignoring duplicates.
fn get_latest_sequence_id_for_inbox( &self, inbox_id: &str, ) -> Result<i64, ConnectionError>
Sourcefn get_latest_sequence_id(
&self,
inbox_ids: &[&str],
) -> Result<HashMap<String, i64>, ConnectionError>
fn get_latest_sequence_id( &self, inbox_ids: &[&str], ) -> Result<HashMap<String, i64>, ConnectionError>
Given a list of inbox_ids return a HashMap of each inbox ID -> highest known sequence ID
Sourcefn count_inbox_updates(
&self,
inbox_ids: &[&str],
) -> Result<HashMap<String, i64>, ConnectionError>
fn count_inbox_updates( &self, inbox_ids: &[&str], ) -> Result<HashMap<String, i64>, ConnectionError>
Returns the count of identity updates for inbox_ids
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.