Trait stremio_core::runtime::Env
source · pub trait Env {
// Required methods
fn fetch<IN: Serialize + ConditionalSend + 'static, OUT: for<'de> Deserialize<'de> + ConditionalSend + 'static>(
request: Request<IN>,
) -> TryEnvFuture<OUT>;
fn get_storage<T: for<'de> Deserialize<'de> + ConditionalSend + 'static>(
key: &str,
) -> TryEnvFuture<Option<T>>;
fn set_storage<T: Serialize>(
key: &str,
value: Option<&T>,
) -> TryEnvFuture<()>;
fn exec_concurrent<F: Future<Output = ()> + ConditionalSend + 'static>(
future: F,
);
fn exec_sequential<F: Future<Output = ()> + ConditionalSend + 'static>(
future: F,
);
fn now() -> DateTime<Utc>;
fn flush_analytics() -> EnvFuture<'static, ()>;
fn analytics_context(
ctx: &Ctx,
streaming_server: &StreamingServer,
path: &str,
) -> Value;
fn log(message: String);
// Provided methods
fn addon_transport(transport_url: &Url) -> Box<dyn AddonTransport>
where Self: Sized + 'static { ... }
fn migrate_storage_schema() -> TryEnvFuture<()>
where Self: Sized { ... }
}
Required Methods§
fn fetch<IN: Serialize + ConditionalSend + 'static, OUT: for<'de> Deserialize<'de> + ConditionalSend + 'static>( request: Request<IN>, ) -> TryEnvFuture<OUT>
fn get_storage<T: for<'de> Deserialize<'de> + ConditionalSend + 'static>( key: &str, ) -> TryEnvFuture<Option<T>>
fn set_storage<T: Serialize>(key: &str, value: Option<&T>) -> TryEnvFuture<()>
fn exec_concurrent<F: Future<Output = ()> + ConditionalSend + 'static>( future: F, )
fn exec_sequential<F: Future<Output = ()> + ConditionalSend + 'static>( future: F, )
fn now() -> DateTime<Utc>
fn flush_analytics() -> EnvFuture<'static, ()>
fn analytics_context( ctx: &Ctx, streaming_server: &StreamingServer, path: &str, ) -> Value
fn log(message: String)
Provided Methods§
fn addon_transport(transport_url: &Url) -> Box<dyn AddonTransport>where
Self: Sized + 'static,
fn migrate_storage_schema() -> TryEnvFuture<()>where
Self: Sized,
Object Safety§
This trait is not object safe.