pub struct StatusDetail {
pub message: Option<String>,
pub progress: Option<Progress>,
pub metadata: HashMap<String, Value>,
}Expand description
Detailed status information.
Optional extended information for debugging and UI display.
§Example
use orcs_component::{StatusDetail, Progress};
let detail = StatusDetail {
message: Some("Compiling crate...".into()),
progress: Some(Progress {
current: 5,
total: Some(10),
unit: Some("crates".into()),
}),
metadata: Default::default(),
};Fields§
§message: Option<String>Human-readable status message.
progress: Option<Progress>Progress information (if applicable).
metadata: HashMap<String, Value>Additional metadata (for debugging/analytics).
Implementations§
Source§impl StatusDetail
impl StatusDetail
Sourcepub fn with_message(message: impl Into<String>) -> StatusDetail
pub fn with_message(message: impl Into<String>) -> StatusDetail
Creates a new StatusDetail with just a message.
§Example
use orcs_component::StatusDetail;
let detail = StatusDetail::with_message("Processing...");
assert_eq!(detail.message, Some("Processing...".into()));Sourcepub fn with_progress(progress: Progress) -> StatusDetail
pub fn with_progress(progress: Progress) -> StatusDetail
Creates a new StatusDetail with progress.
§Example
use orcs_component::{StatusDetail, Progress};
let detail = StatusDetail::with_progress(Progress::new(5, Some(10)));
assert!(detail.progress.is_some());Trait Implementations§
Source§impl Clone for StatusDetail
impl Clone for StatusDetail
Source§fn clone(&self) -> StatusDetail
fn clone(&self) -> StatusDetail
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 StatusDetail
impl Debug for StatusDetail
Source§impl Default for StatusDetail
impl Default for StatusDetail
Source§fn default() -> StatusDetail
fn default() -> StatusDetail
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StatusDetail
impl<'de> Deserialize<'de> for StatusDetail
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StatusDetail, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StatusDetail, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for StatusDetail
impl Serialize for StatusDetail
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
Converts
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> ⓘ
Converts
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