Struct conserve::index::IndexEntry
source · pub struct IndexEntry {
pub apath: Apath,
pub kind: Kind,
pub mtime: i64,
pub unix_mode: UnixMode,
pub owner: Owner,
pub mtime_nanos: u32,
pub addrs: Vec<Address>,
pub target: Option<String>,
}
Expand description
Description of one archived file.
This struct is directly encoded/decoded to the json index file, and also can be constructed by stat-ing (but not reading) a live file.
Fields§
§apath: Apath
Path of this entry relative to the base of the backup, in apath
form.
kind: Kind
Type of file.
mtime: i64
File modification time, in whole seconds past the Unix epoch.
unix_mode: UnixMode
Discretionary Access Control permissions (such as read/write/execute on unix)
owner: Owner
User and Group names of the owners of the file
mtime_nanos: u32
Fractional nanoseconds for modification time.
This is zero in indexes written prior to 0.6.2, but treating it as zero is harmless - around the transition files will be seen as potentially touched.
It seems moderately common that the nanos are zero, probably because the time was set by something that didn’t preserve them. In that case, skip serializing.
addrs: Vec<Address>
For stored files, the blocks holding the file contents.
target: Option<String>
For symlinks only, the target of the symlink.
Trait Implementations§
source§impl Clone for IndexEntry
impl Clone for IndexEntry
source§fn clone(&self) -> IndexEntry
fn clone(&self) -> IndexEntry
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for IndexEntry
impl Debug for IndexEntry
source§impl<'de> Deserialize<'de> for IndexEntry
impl<'de> Deserialize<'de> for IndexEntry
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>,
source§impl EntryTrait for IndexEntry
impl EntryTrait for IndexEntry
source§fn size(&self) -> Option<u64>
fn size(&self) -> Option<u64>
Size of the file, if it is a file. None for directories and symlinks.
source§fn symlink_target(&self) -> Option<&str>
fn symlink_target(&self) -> Option<&str>
Target of the symlink, if this is a symlink.
fn kind(&self) -> Kind
fn mtime(&self) -> OffsetDateTime
fn unix_mode(&self) -> UnixMode
fn owner(&self) -> &Owner
source§impl From<IndexEntry> for EntryValue
impl From<IndexEntry> for EntryValue
source§fn from(index_entry: IndexEntry) -> EntryValue
fn from(index_entry: IndexEntry) -> EntryValue
source§impl PartialEq for IndexEntry
impl PartialEq for IndexEntry
source§fn eq(&self, other: &IndexEntry) -> bool
fn eq(&self, other: &IndexEntry) -> bool
self
and other
values to be equal, and is used
by ==
.