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>) -> Self
pub fn with_message(message: impl Into<String>) -> Self
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) -> Self
pub fn with_progress(progress: Progress) -> Self
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 · 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<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
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