pub enum Attribution {
Owned,
Mismatched {
owner: String,
},
Unchecked,
}Expand description
Whether the filesystem agrees with what a log’s filename claims about its author.
The claim is worth checking because it is the only thing naming an author, and on a
group-writable directory somebody else may get there first: a log called alice.jsonl
that bob created lets bob write records with ids beginning alice:, which merge will
accept and attribute to alice. Permissions are what should stop that. This is what
notices when they did not.
Detection, not prevention. By the time a reader can see a mismatch the forged records are already on disk, so the useful thing is to say so rather than to imply otherwise.
Variants§
Owned
The log is owned by the account its filename names.
Mismatched
It is owned by somebody else, who is named here.
Unchecked
Nothing was checked, because the remote did not report an owner legibly.
Kept apart from Owned deliberately. The whole value of the check is lost if “not
checked” and “checked and fine” look the same to a reader.
Trait Implementations§
Source§impl Clone for Attribution
impl Clone for Attribution
Source§fn clone(&self) -> Attribution
fn clone(&self) -> Attribution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more