pub enum Resolution {
Path(PathBuf),
CaseMismatch {
got: PathBuf,
actual: String,
},
Broken,
Id {
id: Id,
to: PathBuf,
},
DanglingId {
id: Id,
tombstoned: bool,
},
MalformedId,
AmbiguousAlias {
name: String,
candidates: Vec<PathBuf>,
},
External,
Foreign {
workspace: String,
id: Id,
},
}Expand description
How a forward link resolves against the workspace. Path and id forms stay distinct on purpose: the registry owns id resolution (location-independent, stable across moves), while a path is checked against the on-disk name — so a caller can tell which links a rename must rewrite (paths) from which it must leave alone (ids).
Variants§
Path(PathBuf)
A path target that resolves to an existing file (exact name).
CaseMismatch
A path target that only matches case-insensitively; got is the target
as resolved, actual the exact on-disk name.
Broken
A path target with nothing on disk.
Id
A prov:<id> target the registry resolves to the live path to.
DanglingId
A well-formed prov:<id> target with no live registry entry;
tombstoned separates “deleted” from “never issued here” (§4 hazard).
MalformedId
A prov:<id> target failing its check character — a typo.
AmbiguousAlias
A nominal (alias) target several documents claim — unresolvable.
candidates are the sharers, sorted.
External
A URL / mail address — off-workspace, never resolved or rewritten.
Foreign
An id:<workspace>/<id> target naming a document in another workspace.
A clean resolution, not a finding: prov holds no map from a workspace
name to a location (see
Target::Foreign), so it has no
evidence either way about whether the target exists. Reporting a link it
cannot check as broken would be a false positive every host would then
have to suppress — and a check that must be filtered is one nobody
reads. The id is deliberately not check-verified: the foreign
workspace owns its id space and need not be a prov workspace.
Implementations§
Source§impl Resolution
impl Resolution
Sourcepub fn resolved_path(&self) -> Option<&PathBuf>
pub fn resolved_path(&self) -> Option<&PathBuf>
The workspace path this link reaches, if it resolves to one (by path or
through the registry) — what the spanning walk descends into and what a
backlink map keys on. None for broken, dangling, malformed, external.
Trait Implementations§
Source§impl Clone for Resolution
impl Clone for Resolution
Source§fn clone(&self) -> Resolution
fn clone(&self) -> Resolution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Resolution
impl Debug for Resolution
impl Eq for Resolution
Source§impl PartialEq for Resolution
impl PartialEq for Resolution
impl StructuralPartialEq for Resolution
Auto Trait Implementations§
impl Freeze for Resolution
impl RefUnwindSafe for Resolution
impl Send for Resolution
impl Sync for Resolution
impl Unpin for Resolution
impl UnsafeUnpin for Resolution
impl UnwindSafe for Resolution
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.