nautilus_infrastructure::redis::cache

Struct RedisCacheDatabaseAdapter

Source
pub struct RedisCacheDatabaseAdapter {
    pub encoding: SerializationEncoding,
    /* private fields */
}

Fields§

§encoding: SerializationEncoding

Trait Implementations§

Source§

impl CacheDatabaseAdapter for RedisCacheDatabaseAdapter

Source§

fn close(&mut self) -> Result<()>

Source§

fn flush(&mut self) -> Result<()>

Source§

fn load(&self) -> Result<HashMap<String, Bytes>>

Source§

fn load_currencies(&mut self) -> Result<HashMap<Ustr, Currency>>

Source§

fn load_instruments(&mut self) -> Result<HashMap<InstrumentId, InstrumentAny>>

Source§

fn load_synthetics( &mut self, ) -> Result<HashMap<InstrumentId, SyntheticInstrument>>

Source§

fn load_accounts(&mut self) -> Result<HashMap<AccountId, AccountAny>>

Source§

fn load_orders(&mut self) -> Result<HashMap<ClientOrderId, OrderAny>>

Source§

fn load_positions(&mut self) -> Result<HashMap<PositionId, Position>>

Source§

fn load_index_order_position(&self) -> Result<HashMap<ClientOrderId, Position>>

Source§

fn load_index_order_client(&self) -> Result<HashMap<ClientOrderId, ClientId>>

Source§

fn load_currency(&self, code: &Ustr) -> Result<Option<Currency>>

Source§

fn load_instrument( &self, instrument_id: &InstrumentId, ) -> Result<Option<InstrumentAny>>

Source§

fn load_synthetic( &self, instrument_id: &InstrumentId, ) -> Result<SyntheticInstrument>

Source§

fn load_account(&self, account_id: &AccountId) -> Result<Option<AccountAny>>

Source§

fn load_order( &self, client_order_id: &ClientOrderId, ) -> Result<Option<OrderAny>>

Source§

fn load_position(&self, position_id: &PositionId) -> Result<Position>

Source§

fn load_actor( &self, component_id: &ComponentId, ) -> Result<HashMap<String, Bytes>>

Source§

fn delete_actor(&self, component_id: &ComponentId) -> Result<()>

Source§

fn load_strategy( &self, strategy_id: &StrategyId, ) -> Result<HashMap<String, Bytes>>

Source§

fn delete_strategy(&self, component_id: &StrategyId) -> Result<()>

Source§

fn add(&self, key: String, value: Bytes) -> Result<()>

Source§

fn add_currency(&self, currency: &Currency) -> Result<()>

Source§

fn add_instrument(&self, instrument: &InstrumentAny) -> Result<()>

Source§

fn add_synthetic(&self, synthetic: &SyntheticInstrument) -> Result<()>

Source§

fn add_account(&self, account: &AccountAny) -> Result<()>

Source§

fn add_order(&self, order: &OrderAny, client_id: Option<ClientId>) -> Result<()>

Source§

fn add_position(&self, position: &Position) -> Result<()>

Source§

fn add_position_snapshot(&self, snapshot: &PositionSnapshot) -> Result<()>

Source§

fn add_order_book(&self, order_book: &OrderBook) -> Result<()>

Source§

fn add_quote(&self, quote: &QuoteTick) -> Result<()>

Source§

fn load_quotes(&self, instrument_id: &InstrumentId) -> Result<Vec<QuoteTick>>

Source§

fn add_trade(&self, trade: &TradeTick) -> Result<()>

Source§

fn load_trades(&self, instrument_id: &InstrumentId) -> Result<Vec<TradeTick>>

Source§

fn add_bar(&self, bar: &Bar) -> Result<()>

Source§

fn load_bars(&self, instrument_id: &InstrumentId) -> Result<Vec<Bar>>

Source§

fn add_signal(&self, signal: &Signal) -> Result<()>

Source§

fn load_signals(&self, name: &str) -> Result<Vec<Signal>>

Source§

fn add_custom_data(&self, data: &CustomData) -> Result<()>

Source§

fn load_custom_data(&self, data_type: &DataType) -> Result<Vec<CustomData>>

Source§

fn index_venue_order_id( &self, client_order_id: ClientOrderId, venue_order_id: VenueOrderId, ) -> Result<()>

Source§

fn index_order_position( &self, client_order_id: ClientOrderId, position_id: PositionId, ) -> Result<()>

Source§

fn update_actor(&self) -> Result<()>

Source§

fn update_strategy(&self) -> Result<()>

Source§

fn update_account(&self, account: &AccountAny) -> Result<()>

Source§

fn update_order(&self, order_event: &OrderEventAny) -> Result<()>

Source§

fn update_position(&self, position: &Position) -> Result<()>

Source§

fn snapshot_order_state(&self, order: &OrderAny) -> Result<()>

Source§

fn snapshot_position_state(&self, position: &Position) -> Result<()>

Source§

fn heartbeat(&self, timestamp: UnixNanos) -> Result<()>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T

§

impl<T> Ungil for T
where T: Send,