pub struct SimulatedExecution {
pub request_tx: UnboundedSender<SimulatedEvent>,
}Expand description
Simulated ExecutionClient implementation that integrates with the Barter
SimulatedExchange.
Fields§
§request_tx: UnboundedSender<SimulatedEvent>Trait Implementations§
source§impl Clone for SimulatedExecution
impl Clone for SimulatedExecution
source§fn clone(&self) -> SimulatedExecution
fn clone(&self) -> SimulatedExecution
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for SimulatedExecution
impl Debug for SimulatedExecution
source§impl ExecutionClient for SimulatedExecution
impl ExecutionClient for SimulatedExecution
const CLIENT: ExecutionId = ExecutionId::Simulated
type Config = UnboundedSender<SimulatedEvent>
source§fn init<'async_trait>(
request_tx: Self::Config,
__arg1: UnboundedSender<AccountEvent>,
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>where
Self: 'async_trait,
fn init<'async_trait>(
request_tx: Self::Config,
__arg1: UnboundedSender<AccountEvent>,
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>where
Self: 'async_trait,
Initialise a new
ExecutionClient with the provided Self::Config and
AccountEvent transmitter. Read moresource§fn fetch_orders_open<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Order<Open>>, ExecutionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_orders_open<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Order<Open>>, ExecutionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch account
Order<Open>s.source§fn fetch_balances<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SymbolBalance>, ExecutionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_balances<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SymbolBalance>, ExecutionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch account
SymbolBalances.source§fn open_orders<'life0, 'async_trait>(
&'life0 self,
open_requests: Vec<Order<RequestOpen>>,
) -> Pin<Box<dyn Future<Output = Vec<Result<Order<Open>, ExecutionError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn open_orders<'life0, 'async_trait>(
&'life0 self,
open_requests: Vec<Order<RequestOpen>>,
) -> Pin<Box<dyn Future<Output = Vec<Result<Order<Open>, ExecutionError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Open orders.
source§fn cancel_orders<'life0, 'async_trait>(
&'life0 self,
cancel_requests: Vec<Order<RequestCancel>>,
) -> Pin<Box<dyn Future<Output = Vec<Result<Order<Cancelled>, ExecutionError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_orders<'life0, 'async_trait>(
&'life0 self,
cancel_requests: Vec<Order<RequestCancel>>,
) -> Pin<Box<dyn Future<Output = Vec<Result<Order<Cancelled>, ExecutionError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Cancel
Order<Open>s.source§fn cancel_orders_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Order<Cancelled>>, ExecutionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_orders_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Order<Cancelled>>, ExecutionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Cancel all account
Order<Open>s.Auto Trait Implementations§
impl Freeze for SimulatedExecution
impl RefUnwindSafe for SimulatedExecution
impl Send for SimulatedExecution
impl Sync for SimulatedExecution
impl Unpin for SimulatedExecution
impl UnwindSafe for SimulatedExecution
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more