#![crate_type = "staticlib"]
#![forbid(unsafe_code)]
use once_cell::sync::Lazy;
#[cfg(not(feature = "async"))]
pub use ureq;
pub use {filen_settings::*, retry_settings::*};
#[cfg(feature = "async")]
pub use {fure, reqwest};
pub use {retry, secstr, uuid};
pub mod crypto;
mod file_chunk_pos;
mod filen_settings;
mod limited_exponential;
pub mod queries;
mod retry_settings;
mod utils;
pub mod v1;
#[cfg(test)]
mod test_utils;
pub static STANDARD_SETTINGS_BUNDLE: Lazy<SettingsBundle> = Lazy::new(|| SettingsBundle {
filen: DEFAULT_FILEN_SETTINGS.clone(),
retry: *STANDARD_RETRIES,
});
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
#[non_exhaustive]
pub struct SettingsBundle {
pub filen: FilenSettings,
pub retry: RetrySettings,
}
impl Default for SettingsBundle {
fn default() -> Self {
Self {
filen: FilenSettings::default(),
retry: RetrySettings::default(),
}
}
}
impl From<SettingsBundle> for FilenSettings {
fn from(settings_bundle: SettingsBundle) -> Self {
settings_bundle.filen
}
}
impl From<SettingsBundle> for RetrySettings {
fn from(settings_bundle: SettingsBundle) -> Self {
settings_bundle.retry
}
}