pub struct CacheIdentity {
pub host: String,
pub user: u32,
pub group: u32,
pub groups: Vec<u32>,
pub umask: Option<u32>,
pub machine: String,
pub cpu_models: Vec<String>,
}Expand description
The identity of the machine and the user that a cache belongs to, which the store writes when it creates the database and compares on every later open.
Fields§
§host: StringThe host name of the machine.
user: u32The effective user ID.
group: u32The effective group ID.
groups: Vec<u32>The supplementary group IDs, sorted and distinct.
umask: Option<u32>The umask, from the Umask line of /proc/self/status, or None when the
file has no such line.
machine: StringThe machine architecture, the machine field of uname.
cpu_models: Vec<String>The distinct model name values of /proc/cpuinfo, sorted; empty when it has
none.
Implementations§
Source§impl CacheIdentity
impl CacheIdentity
Sourcepub fn differences(&self, current: &Self) -> Vec<IdentityDifference>
pub fn differences(&self, current: &Self) -> Vec<IdentityDifference>
Each value of this identity, the stored one, that differs from current, in
the order of IdentityPart::ALL; empty when the two are the same.
The values are compared as the record holds them, field by field, never by the text that messages show: two lists of CPU models can show the same text and still differ.
Trait Implementations§
Source§impl Clone for CacheIdentity
impl Clone for CacheIdentity
Source§impl Debug for CacheIdentity
impl Debug for CacheIdentity
Source§impl<'bytes, Ctx> Decode<'bytes, Ctx> for CacheIdentity
impl<'bytes, Ctx> Decode<'bytes, Ctx> for CacheIdentity
Source§impl<Ctx> Encode<Ctx> for CacheIdentity
impl<Ctx> Encode<Ctx> for CacheIdentity
impl Eq for CacheIdentity
Source§impl PartialEq for CacheIdentity
impl PartialEq for CacheIdentity
Source§impl Record for CacheIdentity
impl Record for CacheIdentity
impl StructuralPartialEq for CacheIdentity
Auto Trait Implementations§
impl Freeze for CacheIdentity
impl RefUnwindSafe for CacheIdentity
impl Send for CacheIdentity
impl Sync for CacheIdentity
impl Unpin for CacheIdentity
impl UnsafeUnpin for CacheIdentity
impl UnwindSafe for CacheIdentity
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.