pub struct FileMeta {
pub versions: Vec<FileMetaShallowVersion>,
pub data: InlineData,
pub meta_ver: u8,
}Fields§
§versions: Vec<FileMetaShallowVersion>§data: InlineData§meta_ver: u8Implementations§
Source§impl FileMeta
impl FileMeta
Sourcepub fn transition_reconcile_generation(
&self,
version_id: Option<Uuid>,
) -> Result<Vec<u8>>
pub fn transition_reconcile_generation( &self, version_id: Option<Uuid>, ) -> Result<Vec<u8>>
Canonical identity of every version and inline byte, excluding only the three repairable suffixes on the selected version. It survives a repair and encoding-order changes, while detecting unrelated metadata changes.
Sourcepub fn reconcile_transition_state(
&mut self,
version_id: Option<Uuid>,
target: &TransitionStateReconcileTarget,
) -> Result<bool>
pub fn reconcile_transition_state( &mut self, version_id: Option<Uuid>, target: &TransitionStateReconcileTarget, ) -> Result<bool>
Returns false for an already converged record. Callers must serialize the read/check/commit and compare the observed metadata generation.
Source§impl FileMeta
impl FileMeta
pub fn is_xl2_v1_format(buf: &[u8]) -> bool
pub fn load(buf: &[u8]) -> Result<FileMeta>
Sourcepub fn read_format_versions(buf: &[u8]) -> Result<(u16, u16, u8, u8)>
pub fn read_format_versions(buf: &[u8]) -> Result<(u16, u16, u8, u8)>
Read (major, minor, header_ver, meta_ver) from xl.meta without full parse. Returns Err if format is not feat (e.g. legacy uses rmp_serde in meta block).
pub fn check_xl2_v1(buf: &[u8]) -> Result<(&[u8], u16, u16)>
pub fn is_indexed_meta(buf: &[u8]) -> Result<(&[u8], &[u8])>
pub fn read_bytes_header(buf: &[u8]) -> Result<(u32, &[u8])>
pub fn unmarshal_msg(&mut self, buf: &[u8]) -> Result<u64>
pub fn is_latest_delete_marker(buf: &[u8]) -> bool
pub fn marshal_msg(&self) -> Result<Vec<u8>>
Source§impl FileMeta
impl FileMeta
Sourcepub fn is_compatible_with_meta(&self) -> bool
pub fn is_compatible_with_meta(&self) -> bool
Check if the metadata format is compatible
Sourcepub fn validate_integrity(&self) -> Result<()>
pub fn validate_integrity(&self) -> Result<()>
Validate metadata integrity
Sourcepub fn get_version_stats(&self) -> VersionStats
pub fn get_version_stats(&self) -> VersionStats
Get statistics about versions
Source§impl FileMeta
impl FileMeta
Sourcepub fn get_detailed_version_stats(&self) -> DetailedVersionStats
pub fn get_detailed_version_stats(&self) -> DetailedVersionStats
Get detailed statistics about versions
Source§impl FileMeta
impl FileMeta
pub fn new() -> Self
pub fn find_version( &self, vid: Option<Uuid>, ) -> Result<(usize, FileMetaVersion)>
pub fn update_object_version(&mut self, fi: FileInfo) -> Result<()>
pub fn update_object_version_with_opts( &mut self, fi: FileInfo, replace_user_metadata: bool, ) -> Result<()>
pub fn add_version(&mut self, fi: FileInfo) -> Result<()>
pub fn add_version_filemata(&mut self, version: FileMetaVersion) -> Result<()>
pub fn delete_version(&mut self, fi: &FileInfo) -> Result<Option<Uuid>>
pub fn into_fileinfo( &self, volume: &str, path: &str, version_id: &str, read_data: bool, include_free_versions: bool, all_parts: bool, ) -> Result<FileInfo>
pub fn into_fileinfo_without_part_checksums( &self, volume: &str, path: &str, version_id: &str, read_data: bool, include_free_versions: bool, ) -> Result<FileInfo>
pub fn get_file_info_versions( &self, volume: &str, path: &str, include_free_versions: bool, ) -> Result<FileInfoVersions>
pub fn get_all_file_info_versions( &self, volume: &str, path: &str, all_parts: bool, ) -> Result<FileInfoVersions>
pub fn into_file_info_versions( &self, volume: &str, path: &str, all_parts: bool, ) -> Result<FileInfoVersions>
pub fn latest_mod_time(&self) -> Option<OffsetDateTime>
Sourcepub fn load_or_convert(buf: &[u8]) -> Result<Self>
pub fn load_or_convert(buf: &[u8]) -> Result<Self>
Load or convert from buffer. Handles both current (meta_ver=3) and legacy (meta_ver=2) formats.
Sourcepub fn list_versions(
&self,
volume: &str,
path: &str,
all_parts: bool,
) -> Result<Vec<FileInfo>>
pub fn list_versions( &self, volume: &str, path: &str, all_parts: bool, ) -> Result<Vec<FileInfo>>
List all versions as FileInfo
Check if all versions are hidden
Sourcepub fn find_version_str(
&self,
version_id: &str,
) -> Result<(usize, FileMetaVersion)>
pub fn find_version_str( &self, version_id: &str, ) -> Result<(usize, FileMetaVersion)>
Find version by string ID