pub enum Resolution {
One {
node: NodeId,
path: String,
},
UnknownBranch,
AmbiguousBranch {
paths: Vec<String>,
},
UnknownPort {
branch: String,
},
AmbiguousPort {
paths: Vec<String>,
},
}Expand description
The answer to “does Branch::port name exactly one face?”.
“Branch::port 是否恰好命名一个注册面?“的答案。
Every failure is a distinct variant carrying the facts a diagnostic needs (which paths collided), so a caller never has to re-derive them. 每种失败都是独立的变体,并携带诊断所需的事实(哪些路径冲突),因此调用方不需要自己重新 推导。
Variants§
One
Exactly one face provides the port inside the branch. 分支内恰好有一个注册面提供该端口。
UnknownBranch
No node in the tree carries that branch handle. 树中没有任何节点携带该分支句柄。
AmbiguousBranch
Several nodes carry that branch handle, so the reference is ambiguous before the port is even considered. 多个节点携带该分支句柄,因此还没看端口,引用就已经有歧义。
UnknownPort
The branch exists; nothing in it provides that port. 分支存在,但其中没有东西提供该端口。
AmbiguousPort
Several faces inside the branch provide that port. 分支内有多个注册面提供该端口。
Trait Implementations§
Source§impl Clone for Resolution
impl Clone for Resolution
Source§fn clone(&self) -> Resolution
fn clone(&self) -> Resolution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Mutably borrows from an owned value. Read more