use crate::remote::HttpOptions;
use std::sync::Arc;
pub(crate) type RemoteOnDownload = dyn Fn(u64, Option<u64>, String) + Send + Sync + 'static;
#[derive(Default, Clone)]
#[non_exhaustive]
pub struct RemoteOptions {
pub endpoint: String,
pub on_download: Option<Arc<RemoteOnDownload>>,
pub http: Option<HttpOptions>,
}
#[derive(Debug, Default, Clone)]
#[cfg_attr(feature = "_serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "_serde", serde(rename_all = "camelCase"))]
#[non_exhaustive]
pub struct RemoteFetchOptions {
pub channel: Option<String>,
}
impl RemoteFetchOptions {
pub fn channel(mut self, channel: impl Into<String>) -> Self {
self.channel = Some(channel.into());
self
}
}