1
Fork 0

nodeinfo: Don't Serialize, just Deserialize for now

This commit is contained in:
Steffo 2024-11-09 15:02:44 +01:00
parent d964f1befc
commit e5f52a760a
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -3,13 +3,12 @@
//! [RFC 6415]: https://datatracker.ietf.org/doc/html/rfc6415 //! [RFC 6415]: https://datatracker.ietf.org/doc/html/rfc6415
use reqwest::header::HeaderValue; use reqwest::header::HeaderValue;
use serde::{Serialize, Deserialize}; use serde::Deserialize;
/// A [host-meta document]. /// A [host-meta document].
/// ///
/// [host-meta document]: https://datatracker.ietf.org/doc/html/rfc6415 /// [host-meta document]: https://datatracker.ietf.org/doc/html/rfc6415
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct HostMetaDocument { pub struct HostMetaDocument {
/// The resource this document refers to. /// The resource this document refers to.
pub subject: Option<String>, pub subject: Option<String>,
@ -21,7 +20,7 @@ pub struct HostMetaDocument {
/// A [host-meta Link Element], which puts the subject resource in relation with another. /// A [host-meta Link Element], which puts the subject resource in relation with another.
/// ///
/// [host-meta Link Element]: https://datatracker.ietf.org/doc/html/rfc6415#section-3.1.1 /// [host-meta Link Element]: https://datatracker.ietf.org/doc/html/rfc6415#section-3.1.1
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct HostMetaLink { pub struct HostMetaLink {
/// The kind of relation established by the subject with the attached resource. /// The kind of relation established by the subject with the attached resource.
pub rel: String, pub rel: String,