pub mod content;
pub mod fetch;
pub mod ledger;
pub mod monitor;
pub mod package;
pub mod paths;
pub mod proof;
use serde::{Deserialize, Serialize};
pub const REGISTRY_HEADER_NAME: &str = "warg-registry";
pub const REGISTRY_HINT_HEADER_NAME: &str = "warg-registry-hint";
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "type", rename_all = "camelCase")]
pub enum ContentSource {
#[serde(rename_all = "camelCase")]
HttpGet {
url: String,
#[serde(default, skip_serializing_if = "is_false", alias = "accept_ranges")]
accept_ranges: bool,
#[serde(skip_serializing_if = "Option::is_none")]
size: Option<u64>,
},
}
fn is_false(b: &bool) -> bool {
!b
}