pub struct StatusDetail {
pub reason: String,
pub explanation: Option<String>,
pub suggestions: Vec<String>,
pub context: Vec<String>,
}Expand description
Detailed information about the execution status.
Provides rich context for both success and error cases, enabling informative CLI output and debugging.
Fields§
§reason: StringShort reason (one line, suitable for status line). Example: “3 changes in 2 files” Example: “Symbol ‘foo’ not found in registry”
explanation: Option<String>Detailed explanation (can be multi-line). Example: “The rename operation completed successfully.\nAll references were updated.” Example: “The pattern ‘foo*’ matched 0 symbols.\nTry ‘ryo discover foo*’ to see available symbols.”
suggestions: Vec<String>Actionable suggestions for the user.
Example: [“Try ‘ryo discover
context: Vec<String>Related context (e.g., conflicting symbols, matched patterns).
Implementations§
Source§impl StatusDetail
impl StatusDetail
Sourcepub fn with_explanation(self, explanation: impl Into<String>) -> Self
pub fn with_explanation(self, explanation: impl Into<String>) -> Self
Add an explanation.
Sourcepub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
pub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
Add a suggestion.
Sourcepub fn with_suggestions(
self,
suggestions: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn with_suggestions( self, suggestions: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Add multiple suggestions.
Sourcepub fn with_context(self, context: impl Into<String>) -> Self
pub fn with_context(self, context: impl Into<String>) -> Self
Add context information.
Trait Implementations§
Source§impl Clone for StatusDetail
impl Clone for StatusDetail
Source§fn clone(&self) -> StatusDetail
fn clone(&self) -> StatusDetail
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StatusDetail
impl Debug for StatusDetail
Source§impl Default for StatusDetail
impl Default for StatusDetail
Source§fn default() -> StatusDetail
fn default() -> StatusDetail
Source§impl<'de> Deserialize<'de> for StatusDetail
impl<'de> Deserialize<'de> for StatusDetail
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>,
Auto Trait Implementations§
impl Freeze for StatusDetail
impl RefUnwindSafe for StatusDetail
impl Send for StatusDetail
impl Sync for StatusDetail
impl Unpin for StatusDetail
impl UnsafeUnpin for StatusDetail
impl UnwindSafe for StatusDetail
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<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more