pub enum FacadeResponse {
Success {
data: Option<Value>,
warnings: Vec<FacadeProblem>,
},
Partial {
data: Value,
warnings: Vec<FacadeProblem>,
},
Error {
error: FacadeProblem,
data: Option<String>,
},
Cancelled {
warnings: Vec<FacadeProblem>,
},
}Expand description
Invocation status is independent of payload presence. Successful acknowledgements omit data; partial outcomes always retain their result. Full data is a business value and essential data is YAML text, selected by the request, not inferred here.
Variants§
Implementations§
Source§impl FacadeResponse
impl FacadeResponse
Sourcepub fn acknowledged() -> Self
pub fn acknowledged() -> Self
A completed operation with no business value to return.
pub fn cancelled() -> Self
pub fn success(data: Value) -> Self
pub fn partial(data: Value) -> Self
pub fn error(code: impl Into<String>, message: impl Into<String>) -> Self
pub fn with_details(self, details: Value) -> Self
pub fn status(&self) -> FacadeStatus
pub fn is_error(&self) -> bool
pub fn data(&self) -> Option<&Value>
pub fn data_mut(&mut self) -> Option<&mut Value>
Sourcepub fn with_essential_data(self, text: String) -> Self
pub fn with_essential_data(self, text: String) -> Self
Set the Essential presentation once, preserving the execution outcome. Full error details move into the projected diagnostic data. Acknowledgements and cancellations remain payload-free.
pub fn with_warning(self, warning: FacadeProblem) -> Self
Trait Implementations§
Source§impl Clone for FacadeResponse
impl Clone for FacadeResponse
Source§impl Debug for FacadeResponse
impl Debug for FacadeResponse
Source§impl<'de> Deserialize<'de> for FacadeResponse
impl<'de> Deserialize<'de> for FacadeResponse
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FacadeResponse
impl PartialEq for FacadeResponse
Source§impl Serialize for FacadeResponse
impl Serialize for FacadeResponse
impl StructuralPartialEq for FacadeResponse
Auto Trait Implementations§
impl Freeze for FacadeResponse
impl RefUnwindSafe for FacadeResponse
impl Send for FacadeResponse
impl Sync for FacadeResponse
impl Unpin for FacadeResponse
impl UnsafeUnpin for FacadeResponse
impl UnwindSafe for FacadeResponse
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