pub enum CacheFormat {
OldOnly(OldCache),
NewOnly(NewCache),
Both {
old: OldCache,
new: NewCache,
},
}Expand description
Represents the different cache format combinations that can be found.
Real-world cache files may contain only the old format, only the new format, or both formats for backward compatibility.
§Variants
OldOnly- File contains only the legacy ld.so-1.7.0 formatNewOnly- File contains only the modern glibc formatBoth- File contains both formats (common for compatibility)
§Example
let format = CacheFormat::Both {
old: old_cache,
new: new_cache,
};
match format {
CacheFormat::OldOnly(_) => println!("Legacy format only"),
CacheFormat::NewOnly(_) => println!("Modern format only"),
CacheFormat::Both { .. } => println!("Both formats present"),
}Variants§
Trait Implementations§
Source§impl Clone for CacheFormat
impl Clone for CacheFormat
Source§fn clone(&self) -> CacheFormat
fn clone(&self) -> CacheFormat
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 CacheFormat
impl Debug for CacheFormat
Source§impl PartialEq for CacheFormat
impl PartialEq for CacheFormat
impl StructuralPartialEq for CacheFormat
Auto Trait Implementations§
impl Freeze for CacheFormat
impl RefUnwindSafe for CacheFormat
impl Send for CacheFormat
impl Sync for CacheFormat
impl Unpin for CacheFormat
impl UnwindSafe for CacheFormat
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