pub trait Durable:
Send
+ Sync
+ 'static {
// Required methods
fn save(
&self,
topic: TopicCode,
message: DurableMessage,
) -> impl Future<Output = Result<(), DurableError>> + Send;
fn update_status(
&self,
topic: TopicCode,
update: MessageStateUpdate,
) -> impl Future<Output = Result<(), DurableError>> + Send;
fn retrieve(
&self,
topic: TopicCode,
message_id: MessageId,
) -> impl Future<Output = Result<DurableMessage, DurableError>> + Send;
fn batch_retrieve(
&self,
topic: TopicCode,
query: DurableMessageQuery,
) -> impl Future<Output = Result<Vec<DurableMessage>, DurableError>> + Send;
fn archive(
&self,
topic: TopicCode,
message_id: MessageId,
) -> impl Future<Output = Result<(), DurableError>> + Send;
fn create_topic(
&self,
topic: TopicConfig,
) -> impl Future<Output = Result<(), DurableError>> + Send;
fn delete_topic(
&self,
topic: TopicCode,
) -> impl Future<Output = Result<(), DurableError>> + Send;
fn topic_code_list(
&self,
) -> impl Future<Output = Result<Vec<TopicCode>, DurableError>> + Send;
fn topic_list(
&self,
) -> impl Future<Output = Result<Vec<TopicConfig>, DurableError>> + Send;
}Required Methods§
fn save( &self, topic: TopicCode, message: DurableMessage, ) -> impl Future<Output = Result<(), DurableError>> + Send
fn update_status( &self, topic: TopicCode, update: MessageStateUpdate, ) -> impl Future<Output = Result<(), DurableError>> + Send
fn retrieve( &self, topic: TopicCode, message_id: MessageId, ) -> impl Future<Output = Result<DurableMessage, DurableError>> + Send
Sourcefn batch_retrieve(
&self,
topic: TopicCode,
query: DurableMessageQuery,
) -> impl Future<Output = Result<Vec<DurableMessage>, DurableError>> + Send
fn batch_retrieve( &self, topic: TopicCode, query: DurableMessageQuery, ) -> impl Future<Output = Result<Vec<DurableMessage>, DurableError>> + Send
the earlier message should be in the front
fn archive( &self, topic: TopicCode, message_id: MessageId, ) -> impl Future<Output = Result<(), DurableError>> + Send
fn create_topic( &self, topic: TopicConfig, ) -> impl Future<Output = Result<(), DurableError>> + Send
fn delete_topic( &self, topic: TopicCode, ) -> impl Future<Output = Result<(), DurableError>> + Send
fn topic_code_list( &self, ) -> impl Future<Output = Result<Vec<TopicCode>, DurableError>> + Send
fn topic_list( &self, ) -> impl Future<Output = Result<Vec<TopicConfig>, DurableError>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".