# Scheduler in maplibre::io::scheduler - Rust
Async/await scheduler. Can schedule a task from a future factory and a shared state.

# Trait maplibre::io::scheduler::Scheduler

source ·

    pub trait Scheduler: 'static {
        // Required method
        fn schedule<T>(
            &self,
            future_factory: impl FnOnce() -> T + Send + 'static
        ) -> Result<(), ScheduleError>
           where T: Future<Output = ()> + 'static;
    }

Expand description

Async/await scheduler. Can schedule a task from a future factory and a shared state.

## Required Methods§

source

#### fn schedule<T>( &self, future_factory: impl FnOnce() -> T + Send + 'static ) -> Result<(), ScheduleError>
where T: Future<Output = ()> + 'static,

## Object Safety§

This trait is not object safe.

## Implementors§

source §

### impl Scheduler for TokioScheduler

source §

### impl Scheduler for NopScheduler