Skip to main content

Service

Trait Service 

Source
pub trait Service:
    Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> &'static str;
    fn owner(&self) -> ServiceOwner;
    fn run<'async_trait>(
        self: Arc<Self>,
        shutdown: ShutdownRx,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait;

    // Provided method
    fn initialize<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn owner(&self) -> ServiceOwner

Source

fn run<'async_trait>( self: Arc<Self>, shutdown: ShutdownRx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,

Provided Methods§

Source

fn initialize<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

Source§

impl Service for CompetitionsSnapshotCache

Source§

fn name(&self) -> &'static str

Source§

fn owner(&self) -> ServiceOwner

Source§

fn run<'async_trait>( self: Arc<Self>, shutdown: ShutdownRx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,

Source§

impl Service for InstrumentsSnapshotCache

Source§

fn name(&self) -> &'static str

Source§

fn owner(&self) -> ServiceOwner

Source§

fn run<'async_trait>( self: Arc<Self>, shutdown: ShutdownRx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,

Source§

impl Service for MarketsSnapshotCache

Source§

fn name(&self) -> &'static str

Source§

fn owner(&self) -> ServiceOwner

Source§

fn run<'async_trait>( self: Arc<Self>, shutdown: ShutdownRx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,

Source§

impl Service for OptionsSummarySnapshotCache

Source§

fn name(&self) -> &'static str

Source§

fn owner(&self) -> ServiceOwner

Source§

fn run<'async_trait>( self: Arc<Self>, shutdown: ShutdownRx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,

Source§

impl Service for SparklinesSnapshotCache

Source§

fn name(&self) -> &'static str

Source§

fn owner(&self) -> ServiceOwner

Source§

fn run<'async_trait>( self: Arc<Self>, shutdown: ShutdownRx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,

Source§

impl Service for CandleWsPublisher

Source§

fn name(&self) -> &'static str

Source§

fn owner(&self) -> ServiceOwner

Source§

fn run<'async_trait>( self: Arc<Self>, shutdown: ShutdownRx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,

Source§

impl Service for UpstashBatchPublisher

Source§

fn name(&self) -> &'static str

Source§

fn owner(&self) -> ServiceOwner

Source§

fn run<'async_trait>( self: Arc<Self>, shutdown: ShutdownRx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,

Implementors§