pub trait QueryRefreshState {
// Required methods
fn get_refresh_state<EntityId: AsRef<[u8]>>(
&self,
entity_id: EntityId,
entity_kind: EntityKind,
originator_id: u32,
) -> Result<Option<RefreshState>, StorageError>;
fn get_last_cursor_for_originators<Id: AsRef<[u8]>>(
&self,
id: Id,
entity_kind: EntityKind,
originator_ids: &[u32],
) -> Result<Vec<Cursor>, StorageError>;
fn get_last_cursor_for_ids<Id: AsRef<[u8]>>(
&self,
ids: &[Id],
entities: &[EntityKind],
) -> Result<HashMap<Vec<u8>, GlobalCursor>, StorageError>;
fn update_cursor<Id: AsRef<[u8]>>(
&self,
entity_id: Id,
entity_kind: EntityKind,
cursor: Cursor,
) -> Result<bool, StorageError>;
fn lowest_common_cursor(
&self,
topics: &[&Topic],
) -> Result<GlobalCursor, StorageError>;
fn lowest_common_cursor_combined(
&self,
topics: &[&Topic],
) -> Result<GlobalCursor, StorageError>;
fn latest_cursor_for_id<Id: AsRef<[u8]>>(
&self,
entity_id: Id,
entities: &[EntityKind],
originators: Option<&[&OriginatorId]>,
) -> Result<GlobalCursor, StorageError>;
fn latest_cursor_combined<Id: AsRef<[u8]>>(
&self,
entity_id: Id,
entities: &[EntityKind],
originators: Option<&[&OriginatorId]>,
) -> Result<GlobalCursor, StorageError>;
fn get_remote_log_cursors(
&self,
conversation_ids: &[&Vec<u8>],
) -> Result<HashMap<Vec<u8>, Cursor>, ConnectionError>;
// Provided method
fn get_last_cursor_for_originator<Id: AsRef<[u8]>>(
&self,
id: Id,
entity_kind: EntityKind,
originator_id: u32,
) -> Result<Cursor, StorageError> { ... }
}Required Methods§
fn get_refresh_state<EntityId: AsRef<[u8]>>( &self, entity_id: EntityId, entity_kind: EntityKind, originator_id: u32, ) -> Result<Option<RefreshState>, StorageError>
fn get_last_cursor_for_originators<Id: AsRef<[u8]>>( &self, id: Id, entity_kind: EntityKind, originator_ids: &[u32], ) -> Result<Vec<Cursor>, StorageError>
fn get_last_cursor_for_ids<Id: AsRef<[u8]>>( &self, ids: &[Id], entities: &[EntityKind], ) -> Result<HashMap<Vec<u8>, GlobalCursor>, StorageError>
fn update_cursor<Id: AsRef<[u8]>>( &self, entity_id: Id, entity_kind: EntityKind, cursor: Cursor, ) -> Result<bool, StorageError>
fn lowest_common_cursor( &self, topics: &[&Topic], ) -> Result<GlobalCursor, StorageError>
fn lowest_common_cursor_combined( &self, topics: &[&Topic], ) -> Result<GlobalCursor, StorageError>
fn latest_cursor_for_id<Id: AsRef<[u8]>>( &self, entity_id: Id, entities: &[EntityKind], originators: Option<&[&OriginatorId]>, ) -> Result<GlobalCursor, StorageError>
fn latest_cursor_combined<Id: AsRef<[u8]>>( &self, entity_id: Id, entities: &[EntityKind], originators: Option<&[&OriginatorId]>, ) -> Result<GlobalCursor, StorageError>
fn get_remote_log_cursors( &self, conversation_ids: &[&Vec<u8>], ) -> Result<HashMap<Vec<u8>, Cursor>, ConnectionError>
Provided Methods§
fn get_last_cursor_for_originator<Id: AsRef<[u8]>>( &self, id: Id, entity_kind: EntityKind, originator_id: u32, ) -> Result<Cursor, StorageError>
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.