barter 0.12.4

Framework for building high-performance live-trading, paper-trading and back-testing systems
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::{Deserialize, Serialize};

pub trait SyncShutdown {
    type Result;
    fn shutdown(&mut self) -> Self::Result;
}

pub trait AsyncShutdown {
    type Result;
    fn shutdown(&mut self) -> impl Future<Output = Self::Result>;
}

#[derive(
    Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Deserialize, Serialize,
)]
pub struct Shutdown;