pub enum BatchResult {
Success(Value),
Error(BatchError),
}Expand description
Result of a single request within a batch
Variants§
Implementations§
Source§impl BatchResult
impl BatchResult
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if the result is successful
Sourcepub fn success_value(&self) -> Option<&Value>
pub fn success_value(&self) -> Option<&Value>
Get the success value if this result is successful
Sourcepub fn error_value(&self) -> Option<&BatchError>
pub fn error_value(&self) -> Option<&BatchError>
Get the error if this result is an error
Trait Implementations§
Source§impl Clone for BatchResult
impl Clone for BatchResult
Source§fn clone(&self) -> BatchResult
fn clone(&self) -> BatchResult
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 BatchResult
impl Debug for BatchResult
Auto Trait Implementations§
impl Freeze for BatchResult
impl RefUnwindSafe for BatchResult
impl Send for BatchResult
impl Sync for BatchResult
impl Unpin for BatchResult
impl UnwindSafe for BatchResult
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