pub struct ArchiveResponse {
pub directory: String,
pub entries: u64,
pub bytes: u64,
pub manifest: EventId,
}Expand description
The answer to POST /api/v1/members/{pk}/archive.
manifest is the archive’s reference: the event ID of the signed
manifest beside the encrypted archive. remove and purge name an
archive by this reference.
§Examples
use stratum_node_core::{ArchiveResponse, EventId};
let answer = ArchiveResponse {
directory: "archive-20261204T120000Z".to_owned(),
entries: 4,
bytes: 812,
manifest: EventId::from_bytes([0xab; 32]),
};
let text = serde_json::to_string(&answer)?;
assert!(text.contains(&format!("\"manifest\":\"{}\"", "ab".repeat(32))));
assert_eq!(serde_json::from_str::<ArchiveResponse>(&text)?, answer);Fields§
§directory: StringThe name of the directory holding the archive and its manifest.
entries: u64The number of entries in the archive.
bytes: u64The unpacked size of the archived pod data, in bytes.
manifest: EventIdThe archive’s reference: the signed manifest’s event ID.
Trait Implementations§
Source§impl Clone for ArchiveResponse
impl Clone for ArchiveResponse
Source§impl Debug for ArchiveResponse
impl Debug for ArchiveResponse
Source§impl<'de> Deserialize<'de> for ArchiveResponse
impl<'de> Deserialize<'de> for ArchiveResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ArchiveResponse
Source§impl Hash for ArchiveResponse
impl Hash for ArchiveResponse
Source§impl PartialEq for ArchiveResponse
impl PartialEq for ArchiveResponse
Source§impl Serialize for ArchiveResponse
impl Serialize for ArchiveResponse
impl StructuralPartialEq for ArchiveResponse
Auto Trait Implementations§
impl Forget for ArchiveResponse
impl Freeze for ArchiveResponse
impl Move for ArchiveResponse
impl RefUnwindSafe for ArchiveResponse
impl Send for ArchiveResponsewhere
RawVecInner: Send,
impl Sync for ArchiveResponsewhere
RawVecInner: Sync,
impl Unpin for ArchiveResponse
impl UnsafeUnpin for ArchiveResponse
impl UnwindSafe for ArchiveResponsewhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more