diidi-travel-common-queue 0.1.16

A collection of common utilities and types for the DiiDi project.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::sync::Arc;

use async_trait::async_trait;

use crate::error::QueueResult;
use crate::queue::Queue;

#[async_trait]
pub trait QueueProvider: Send + Sync + 'static {
  fn name(&self) -> &'static str;
  async fn build(&self, params: &serde_json::Value) -> QueueResult<Arc<dyn Queue>>;
}