QueryIdentityUpdates

Trait QueryIdentityUpdates 

Source
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§

Source

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

Source

fn insert_or_ignore_identity_updates( &self, updates: &[StoredIdentityUpdate], ) -> Result<(), ConnectionError>

Batch insert identity updates, ignoring duplicates.

Source

fn get_latest_sequence_id_for_inbox( &self, inbox_id: &str, ) -> Result<i64, ConnectionError>

Source

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

Source

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.

Implementations on Foreign Types§

Source§

impl<T> QueryIdentityUpdates for &T

Implementors§