pub enum RelationResolution {
Resolved {
target: GraphEntityKey,
selector: ReusableTargetSelector,
generation: IndexGeneration,
},
Ambiguous {
reference: GraphIdentityText,
candidates: NonZeroU32,
},
Unresolved {
reference: GraphIdentityText,
},
External {
target: GraphEntityKey,
external: ExternalSelector,
generation: IndexGeneration,
},
}Expand description
Relationship resolution state and optional exact local jump target.
Variants§
Resolved
Exactly one local entity was resolved.
Fields
target: GraphEntityKeyStable target entity.
selector: ReusableTargetSelectorExact selector accepted by a later summary, relation, or slice adapter.
generation: IndexGenerationComplete generation containing the resolved target.
Ambiguous
More than one statically valid target remains.
Fields
reference: GraphIdentityTextOriginal normalized reference text.
candidates: NonZeroU32Number of retained valid candidates before result limits.
Unresolved
No supported static target was found.
Fields
reference: GraphIdentityTextOriginal normalized reference text.
External
The target is intentionally outside the selected local project.
Fields
target: GraphEntityKeyProject-qualified external entity key.
external: ExternalSelectorTyped external identity retained for fail-closed validation.
generation: IndexGenerationComplete generation containing the external entity record.
Implementations§
Source§impl RelationResolution
impl RelationResolution
Sourcepub fn resolved(target: &GraphEntity) -> Result<Self, GraphContractError>
pub fn resolved(target: &GraphEntity) -> Result<Self, GraphContractError>
Construct one exact local resolution from a graph entity.
§Errors
Returns an error when the target is not a navigable local entity.
Sourcepub fn external(target: &GraphEntity) -> Result<Self, GraphContractError>
pub fn external(target: &GraphEntity) -> Result<Self, GraphContractError>
Construct one external resolution from a graph entity record.
§Errors
Returns an error when the target is not an external entity record.
Sourcepub const fn resolved_target(&self) -> Option<&GraphEntityKey>
pub const fn resolved_target(&self) -> Option<&GraphEntityKey>
Return the exact traversable local target, if one exists.
Trait Implementations§
Source§impl Clone for RelationResolution
impl Clone for RelationResolution
Source§fn clone(&self) -> RelationResolution
fn clone(&self) -> RelationResolution
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RelationResolution
impl Debug for RelationResolution
Source§impl<'de> Deserialize<'de> for RelationResolution
impl<'de> Deserialize<'de> for RelationResolution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for RelationResolution
impl PartialEq for RelationResolution
Source§impl Serialize for RelationResolution
impl Serialize for RelationResolution
impl Eq for RelationResolution
impl StructuralPartialEq for RelationResolution
Auto Trait Implementations§
impl Freeze for RelationResolution
impl RefUnwindSafe for RelationResolution
impl Send for RelationResolution
impl Sync for RelationResolution
impl Unpin for RelationResolution
impl UnwindSafe for RelationResolution
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.