Trait maplibre::environment::Environment
source · pub trait Environment: 'static {
type MapWindowConfig: MapWindowConfig;
type AsyncProcedureCall: AsyncProcedureCall<Self::OffscreenKernelEnvironment>;
type Scheduler: Scheduler;
type HttpClient: HttpClient;
type OffscreenKernelEnvironment: OffscreenKernel;
}
Expand description
The environment defines which types must be injected into maplibre at compile time. Essentially, this trait implements the dependency injection design pattern. By instantiating this trait at compile time with concrete types, it is possible to create different compile-time instances of maplibre.
For example it is possible to change the way tasks are scheduled. It is also possible to change the HTTP implementation for fetching tiles over the network.
Required Associated Types§
type MapWindowConfig: MapWindowConfig
type AsyncProcedureCall: AsyncProcedureCall<Self::OffscreenKernelEnvironment>
type Scheduler: Scheduler
type HttpClient: HttpClient
type OffscreenKernelEnvironment: OffscreenKernel
Object Safety§
This trait is not object safe.