pub enum Collision {
Id {
id: Id,
held_by: PathBuf,
},
Path {
path: PathBuf,
held: Id,
},
}Expand description
A registration that would displace one the index already holds.
The index is a bijection: one id names one path, one path carries one id. Registering across an existing entry breaks that, and in one of two directions — worth telling apart, because what the user has to do about them differs.
Both are ordinary under sync. id_storage defaults to both, so a document’s
id travels in its own frontmatter: a transport can land a copy of a document
under a new name, and now two files spell one id with the registry able to
name only one of them. The registry cannot arbitrate that — only the author
can — so an operation that would resolve it silently refuses instead.
Variants§
Id
The id already resolves to a different live document. Registering would take the id away from a document whose frontmatter still spells it.
Path
The path already carries a different id. Registering would drop that id out of the registry while the document on disk still spells it — turning a live id into an unregistered one.
Trait Implementations§
impl Eq for Collision
impl StructuralPartialEq for Collision
Auto Trait Implementations§
impl Freeze for Collision
impl RefUnwindSafe for Collision
impl Send for Collision
impl Sync for Collision
impl Unpin for Collision
impl UnsafeUnpin for Collision
impl UnwindSafe for Collision
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.