pub enum OperationResult {
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
Node operations use the Full App result contract. Presentation stays at the App boundary. 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() -> FacadeResponse
pub fn acknowledged() -> FacadeResponse
A completed operation with no business value to return.
pub fn cancelled() -> FacadeResponse
pub fn success(data: Value) -> FacadeResponse
pub fn partial(data: Value) -> FacadeResponse
pub fn error( code: impl Into<String>, message: impl Into<String>, ) -> FacadeResponse
pub fn with_details(self, details: Value) -> FacadeResponse
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) -> FacadeResponse
pub fn with_essential_data(self, text: String) -> FacadeResponse
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) -> FacadeResponse
Trait Implementations§
Source§impl Clone for FacadeResponse
impl Clone for FacadeResponse
Source§fn clone(&self) -> FacadeResponse
fn clone(&self) -> FacadeResponse
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 FacadeResponse
impl Debug for FacadeResponse
Source§impl<'de> Deserialize<'de> for FacadeResponse
impl<'de> Deserialize<'de> for FacadeResponse
Source§fn deserialize<D>(
deserializer: D,
) -> Result<FacadeResponse, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<FacadeResponse, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
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
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
impl StructuralPartialEq for FacadeResponse
Auto Trait Implementations§
impl Forget for FacadeResponse
impl Freeze for FacadeResponsewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<FacadeProblem>: Freeze,
impl Move for FacadeResponse
impl RefUnwindSafe for FacadeResponse
impl Send for FacadeResponse
impl Sync for FacadeResponse
impl Unpin for FacadeResponse
impl UnsafeUnpin for FacadeResponsewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<FacadeProblem>: UnsafeUnpin,
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