pub struct FileMetaVersion {
pub version_type: VersionType,
pub legacy_object: Option<MetaObjectV1>,
pub object: Option<MetaObject>,
pub delete_marker: Option<MetaDeleteMarker>,
pub write_version: u64,
pub uses_legacy_checksum: bool,
}Fields§
§version_type: VersionType§legacy_object: Option<MetaObjectV1>§object: Option<MetaObject>§delete_marker: Option<MetaDeleteMarker>§write_version: u64§uses_legacy_checksum: boolTrue when parsed via rmp_serde fallback (legacy format). Used for checksum algorithm selection.
Implementations§
Source§impl FileMetaVersion
impl FileMetaVersion
pub fn valid(&self) -> bool
pub fn get_data_dir(&self) -> Option<Uuid>
pub fn get_version_id(&self) -> Option<Uuid>
pub fn get_mod_time(&self) -> Option<OffsetDateTime>
pub fn decode_data_dir_from_meta(buf: &[u8]) -> Result<Option<Uuid>>
pub fn decode_from<R: Read>(&mut self, rd: &mut R) -> Result<()>
pub fn encode_to<W: Write>(&self, wr: &mut W) -> Result<()>
pub fn unmarshal_msg(&mut self, buf: &[u8]) -> Result<u64>
pub fn marshal_msg(&self) -> Result<Vec<u8>>
pub fn free_version(&self) -> bool
pub fn header(&self) -> FileMetaVersionHeader
pub fn into_fileinfo( &self, volume: &str, path: &str, all_parts: bool, ) -> Result<FileInfo>
Sourcepub fn get_signature(&self) -> [u8; 4]
pub fn get_signature(&self) -> [u8; 4]
Compute the header signature for this version.
The signature must be identical across all disks that hold the same
logical version, yet differ whenever any body field differs (tags,
user/system metadata, parts, size, …). Otherwise a partial-write
divergence (e.g. PutObjectTagging reaching only some disks) shares the
same version_id+mod_time and becomes undetectable / unhealable — the
bug tracked in backlog#861 (B12), where this was hardcoded to [0;4].
Per-disk-varying fields (erasure_index) are excluded so identical
content never falsely diverges. Semantics follow MinIO’s
xlMetaV2Version.getSignature.
Sourcepub fn uses_data_dir(&self) -> bool
pub fn uses_data_dir(&self) -> bool
Check if this version uses data directory
Sourcepub fn uses_inline_data(&self) -> bool
pub fn uses_inline_data(&self) -> bool
Check if this version uses inline data