pub struct Resolution {
pub source: Option<Source>,
pub path: Option<String>,
pub version: Option<String>,
pub status: Status,
pub warning_code: Option<WarningCode>,
pub error_code: Option<ErrorCode>,
pub error_details: Option<ErrorDetails>,
pub action: Option<PromptAction>,
pub deferred_check: Option<DeferredCheck>,
}Expand description
Final output of resolve.
Fields§
§source: Option<Source>Which source produced the result, if any.
path: Option<String>The resolved path, if any.
version: Option<String>The version observed, if any.
status: StatusOutcome category.
warning_code: Option<WarningCode>Warning code when status == OkWithWarning.
error_code: Option<ErrorCode>Error code when status == Error.
error_details: Option<ErrorDetails>Mismatch details when available.
action: Option<PromptAction>Action to show when status == Prompt.
deferred_check: Option<DeferredCheck>Which deferred check the host must run when status == Deferred.
Implementations§
Source§impl Resolution
impl Resolution
Sourcepub fn ok_warn(
source: Source,
path: String,
version: String,
code: WarningCode,
) -> Self
pub fn ok_warn( source: Source, path: String, version: String, code: WarningCode, ) -> Self
Construct an OkWithWarning result.
Sourcepub fn error(code: ErrorCode, details: Option<ErrorDetails>) -> Self
pub fn error(code: ErrorCode, details: Option<ErrorDetails>) -> Self
Construct an Error result.
Sourcepub fn prompt(action: PromptAction) -> Self
pub fn prompt(action: PromptAction) -> Self
Construct a Prompt result.
Sourcepub fn deferred(source: Source, path: String, check: DeferredCheck) -> Self
pub fn deferred(source: Source, path: String, check: DeferredCheck) -> Self
Construct a Deferred result.
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
Source§impl<'de> Deserialize<'de> for Resolution
impl<'de> Deserialize<'de> for Resolution
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Resolution
impl PartialEq for Resolution
Source§fn eq(&self, other: &Resolution) -> bool
fn eq(&self, other: &Resolution) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Resolution
impl Serialize for Resolution
impl Eq 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