openlimits_exchange/exchange.rs
1// use messaging::Subscriber;
2// use async_trait::async_trait;
3//
4// #[async_trait]
5// pub trait Exchange: Subscriber {
6// type InitializationParameters;
7//
8// fn endpoint_url(environment: Environment) -> &'static str;
9// async fn new(parameters: Self::InitializationParameters) -> Result<Self, Self::Error> where Self: Sized;
10// }
11
12#[derive(Debug, Clone, Copy, PartialEq)]
13pub enum Environment {
14 Production,
15 Sandbox
16}
17
18impl Default for Environment {
19 fn default() -> Self {
20 Self::Production
21 }
22}