pub enum LinkRef {
Local {
vf_id: String,
},
Cross {
vf_id: String,
vfr_id: String,
},
}Expand description
v0.8: typed reference resolved from Link.target.
Targets stay opaque String on the wire (canonical-JSON stable). At
validation/render time callers parse via LinkRef::parse. The
Local variant is the v0–v0.7 shape; Cross is new in v0.8 and
requires the dependent frontier to declare a matching vfr_id in
frontier.dependencies.
Variants§
Local
vf_<16hex> — the target finding lives in this same frontier.
Cross
vf_<16hex>@vfr_<16hex> — the target finding lives in a
different frontier. Strict validation requires the vfr_id to
appear in Project.frontier.dependencies.
Implementations§
Source§impl LinkRef
impl LinkRef
Sourcepub fn parse(s: &str) -> Result<Self, LinkParseError>
pub fn parse(s: &str) -> Result<Self, LinkParseError>
Parse vf_<id> or vf_<id>@vfr_<id> into a typed reference.
Treats inputs as opaque hex-ish blobs — does not validate hex
length or character set, since the substrate’s content-address
derivation already handles that.
Sourcepub fn is_cross_frontier(&self) -> bool
pub fn is_cross_frontier(&self) -> bool
True if this reference points outside the current frontier.
Trait Implementations§
impl Eq for LinkRef
impl StructuralPartialEq for LinkRef
Auto Trait Implementations§
impl Freeze for LinkRef
impl RefUnwindSafe for LinkRef
impl Send for LinkRef
impl Sync for LinkRef
impl Unpin for LinkRef
impl UnsafeUnpin for LinkRef
impl UnwindSafe for LinkRef
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.