pub struct BatchError {
pub index: usize,
pub id: Option<String>,
pub error: String,
pub code: BatchErrorCode,
}Expand description
Error information for a single item in a batch operation
Fields§
§index: usizeIndex in the original batch (for create/update operations)
id: Option<String>ID of the entity (for update/delete/get operations, if available)
error: StringHuman-readable error message
code: BatchErrorCodeError code for programmatic handling
Implementations§
Source§impl BatchError
impl BatchError
Sourcepub fn from_error(index: usize, id: Option<String>, err: &CommerceError) -> Self
pub fn from_error(index: usize, id: Option<String>, err: &CommerceError) -> Self
Create a new BatchError from an index and CommerceError
Trait Implementations§
Source§impl Clone for BatchError
impl Clone for BatchError
Source§fn clone(&self) -> BatchError
fn clone(&self) -> BatchError
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 BatchError
impl Debug for BatchError
Source§impl<'de> Deserialize<'de> for BatchError
impl<'de> Deserialize<'de> for BatchError
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 BatchError
impl RefUnwindSafe for BatchError
impl Send for BatchError
impl Sync for BatchError
impl Unpin for BatchError
impl UnwindSafe for BatchError
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