pub enum BatchItemStatus<T> {
Ok {
value: T,
},
Error {
error: BatchItemError,
},
}Expand description
Either a successful per-item outcome (Ok) or a per-item failure
(Error). Serializes as a tagged enum with the discriminant in
status:
{ "status": "ok", "value": { ... } }
{ "status": "error", "error": { "code": "POLICY_DENIED", "message": "…" } }The code field maps 1:1 to CoolError::code, so consumers
can share error-code constants across single and batch routes.
Variants§
Trait Implementations§
Source§impl<T: Clone> Clone for BatchItemStatus<T>
impl<T: Clone> Clone for BatchItemStatus<T>
Source§fn clone(&self) -> BatchItemStatus<T>
fn clone(&self) -> BatchItemStatus<T>
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<T: Debug> Debug for BatchItemStatus<T>
impl<T: Debug> Debug for BatchItemStatus<T>
Source§impl<'de, T> Deserialize<'de> for BatchItemStatus<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for BatchItemStatus<T>where
T: Deserialize<'de>,
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<T: PartialEq> PartialEq for BatchItemStatus<T>
impl<T: PartialEq> PartialEq for BatchItemStatus<T>
Source§impl<T> Serialize for BatchItemStatus<T>where
T: Serialize,
impl<T> Serialize for BatchItemStatus<T>where
T: Serialize,
impl<T> StructuralPartialEq for BatchItemStatus<T>
Auto Trait Implementations§
impl<T> Freeze for BatchItemStatus<T>where
T: Freeze,
impl<T> RefUnwindSafe for BatchItemStatus<T>where
T: RefUnwindSafe,
impl<T> Send for BatchItemStatus<T>where
T: Send,
impl<T> Sync for BatchItemStatus<T>where
T: Sync,
impl<T> Unpin for BatchItemStatus<T>where
T: Unpin,
impl<T> UnsafeUnpin for BatchItemStatus<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for BatchItemStatus<T>where
T: UnwindSafe,
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