pub enum Target {
Path(PathBuf),
UnresolvedId(Id),
AmbiguousAlias(String),
External,
Foreign {
workspace: String,
id: Id,
},
}Expand description
The resolution of one link target against a workspace: a path, an ID the registry does not currently resolve, or an off-workspace reference.
Variants§
Path(PathBuf)
A (normalized, workspace-relative) path.
UnresolvedId(Id)
An id:<id> reference with no live registry entry — unknown,
tombstoned, or the workspace has no registry at all.
AmbiguousAlias(String)
A nominal (alias) reference whose name several documents claim, so it
cannot be resolved to one. The String is the name as written.
External
A URL or mail address — never resolved against the workspace and never rewritten by moves.
Foreign
An id:<workspace>/<id> reference naming a document in another
workspace — carried, never rewritten, and never reported broken.
prov stops here on purpose. Resolving this would require a map from a
workspace name to a location, and that map is a property of the device
doing the reading, not of the archive being read: the same reference
resolves to a directory on one machine, a URL on another, and nothing at
all on a third. So the library reports what was named and leaves
where it lives to the host — prov-cli keeps a device-local peer map,
diaryx resolves through its published ARK permalinks.
The shape that answer comes back in, and the check that makes it
trustworthy, are crate::peer. Following one is a step a caller takes
after this, never a deeper mode of it.
A reference qualified with this workspace’s own
workspace_id is not foreign: it is
resolved locally through the registry, so a document carrying one keeps
working when it is copied into the workspace it names.
Trait Implementations§
impl Eq for Target
impl StructuralPartialEq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnsafeUnpin for Target
impl UnwindSafe for Target
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.