use super::{Blob, BlobMeta};
#[derive(Debug, Clone)]
pub struct VerifiedBlobMeta {
meta: BlobMeta,
blob: Blob,
}
impl VerifiedBlobMeta {
#[must_use]
pub fn new(blob: Blob) -> Self {
Self {
meta: blob.meta(),
blob,
}
}
#[must_use]
pub const fn meta(&self) -> BlobMeta {
self.meta
}
#[must_use]
pub const fn blob(&self) -> &Blob {
&self.blob
}
#[must_use]
pub fn into_parts(self) -> (BlobMeta, Blob) {
(self.meta, self.blob)
}
}