pub struct CardMetadata {
pub id: String,
pub compressed_size: u64,
pub original_size: Option<u64>,
pub profile: Option<String>,
pub created: Option<u64>,
pub dict_version: Option<String>,
}๐Deprecated: Use GenericMetadata instead
Expand description
Card metadata (stored as JSON)
Fieldsยง
ยงid: String๐Deprecated: Use GenericMetadata instead
Document identifier (e.g., โstd::vec::Vecโ)
compressed_size: u64๐Deprecated: Use GenericMetadata instead
Compressed payload size in bytes
original_size: Option<u64>๐Deprecated: Use GenericMetadata instead
Original CML size before compression (optional)
profile: Option<String>๐Deprecated: Use GenericMetadata instead
CML profile (e.g., โcode:apiโ, โlegal:constitutionโ)
created: Option<u64>๐Deprecated: Use GenericMetadata instead
Creation timestamp (Unix milliseconds)
dict_version: Option<String>๐Deprecated: Use GenericMetadata instead
BytePunch dictionary version used
Implementationsยง
Sourceยงimpl CardMetadata
impl CardMetadata
Sourcepub fn new(id: impl Into<String>, compressed_size: u64) -> Self
๐Deprecated: Use GenericMetadata instead
pub fn new(id: impl Into<String>, compressed_size: u64) -> Self
Create minimal metadata with just ID and compressed size
Sourcepub fn with_original_size(self, size: u64) -> Self
๐Deprecated: Use GenericMetadata instead
pub fn with_original_size(self, size: u64) -> Self
Builder: set original size
Sourcepub fn with_profile(self, profile: impl Into<String>) -> Self
๐Deprecated: Use GenericMetadata instead
pub fn with_profile(self, profile: impl Into<String>) -> Self
Builder: set CML profile
Sourcepub fn with_timestamp(self, timestamp: u64) -> Self
๐Deprecated: Use GenericMetadata instead
pub fn with_timestamp(self, timestamp: u64) -> Self
Builder: set creation timestamp
Sourcepub fn with_dict_version(self, version: impl Into<String>) -> Self
๐Deprecated: Use GenericMetadata instead
pub fn with_dict_version(self, version: impl Into<String>) -> Self
Builder: set dictionary version
Trait Implementationsยง
Sourceยงimpl Clone for CardMetadata
impl Clone for CardMetadata
Sourceยงfn clone(&self) -> CardMetadata
fn clone(&self) -> CardMetadata
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSourceยงimpl Debug for CardMetadata
impl Debug for CardMetadata
Sourceยงimpl<'de> Deserialize<'de> for CardMetadata
impl<'de> Deserialize<'de> for CardMetadata
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
Sourceยงimpl PartialEq for CardMetadata
impl PartialEq for CardMetadata
Sourceยงimpl Serialize for CardMetadata
impl Serialize for CardMetadata
impl StructuralPartialEq for CardMetadata
Auto Trait Implementationsยง
impl Freeze for CardMetadata
impl RefUnwindSafe for CardMetadata
impl Send for CardMetadata
impl Sync for CardMetadata
impl Unpin for CardMetadata
impl UnwindSafe for CardMetadata
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