pub enum ChildResultDto {
Ok(Value),
Err {
kind: String,
message: String,
},
Aborted,
}Expand description
Serializable representation of ChildResult.
Use this type for IPC, persistence, or JSON serialization.
§Example
use orcs_component::{ChildResult, ChildResultDto, ChildError};
use serde_json::json;
let result = ChildResult::Err(ChildError::Timeout { elapsed_ms: 5000 });
let dto: ChildResultDto = result.into();
let json = serde_json::to_string(&dto).expect("ChildResultDto should serialize");
assert!(json.contains("timeout"));Variants§
Ok(Value)
Work completed successfully.
Err
Work failed with error details.
Fields
Aborted
Work was aborted by a Signal.
Implementations§
Trait Implementations§
Source§impl Clone for ChildResultDto
impl Clone for ChildResultDto
Source§fn clone(&self) -> ChildResultDto
fn clone(&self) -> ChildResultDto
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 ChildResultDto
impl Debug for ChildResultDto
Source§impl Default for ChildResultDto
impl Default for ChildResultDto
Source§impl<'de> Deserialize<'de> for ChildResultDto
impl<'de> Deserialize<'de> for ChildResultDto
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 From<ChildResult> for ChildResultDto
impl From<ChildResult> for ChildResultDto
Source§fn from(result: ChildResult) -> Self
fn from(result: ChildResult) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ChildResultDto
impl PartialEq for ChildResultDto
Source§impl Serialize for ChildResultDto
impl Serialize for ChildResultDto
impl StructuralPartialEq for ChildResultDto
Auto Trait Implementations§
impl Freeze for ChildResultDto
impl RefUnwindSafe for ChildResultDto
impl Send for ChildResultDto
impl Sync for ChildResultDto
impl Unpin for ChildResultDto
impl UnsafeUnpin for ChildResultDto
impl UnwindSafe for ChildResultDto
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