#[non_exhaustive]pub struct Resolution {
pub from: String,
pub kind: ResolutionKind,
pub to: String,
pub asof: Option<String>,
}Expand description
One entry of Resolved::resolutions: an object with exactly from, kind and to, all
strings, and asof (an instant) exactly when the kind is lookup or chain.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.from: StringWhat was resolved: an alias, an argument name, a label, or <class>(...).<method>.
kind: ResolutionKindThe kind of resolution.
to: StringWhat it resolved to.
asof: Option<String>The instant a lookup or chain cell was read as of; Some exactly for ResolutionKind::Lookup
and ResolutionKind::Chain.
Implementations§
Source§impl Resolution
impl Resolution
Sourcepub fn new(from: &str, kind: ResolutionKind, to: &str) -> Result<Resolution>
pub fn new(from: &str, kind: ResolutionKind, to: &str) -> Result<Resolution>
A resolution of any kind but lookup and chain; E_ENVELOPE for those (use
Resolution::lookup or Resolution::chain, which need the asof).
Trait Implementations§
Source§impl Clone for Resolution
impl Clone for Resolution
Source§impl Debug for Resolution
impl Debug for Resolution
impl Eq for Resolution
Source§impl Hash for Resolution
impl Hash for Resolution
Source§impl PartialEq for Resolution
impl PartialEq for Resolution
impl StructuralPartialEq for Resolution
Auto Trait Implementations§
impl Forget for Resolution
impl Freeze for Resolution
impl Move 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