tangled-api 0.1.0

Lexicon-generated XRPC client for Tangled and AT Protocol APIs
Documentation
//! Hand-written types referenced by the generated lexicon code.

use serde::{Deserialize, Serialize};

/// A blob reference as stored in records (`{"$type": "blob", "ref": {"$link": ...}, ...}`).
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
pub struct BlobRef {
    #[serde(
        rename = "$type",
        skip_serializing_if = "Option::is_none",
        default
    )]
    pub record_type: Option<String>,
    #[serde(rename = "ref")]
    pub reference: BlobLink,
    #[serde(rename = "mimeType")]
    pub mime_type: String,
    pub size: u64,
}

#[derive(Clone, Debug, Default, Serialize, Deserialize)]
pub struct BlobLink {
    #[serde(rename = "$link")]
    pub link: String,
}