pub struct StreamErrorInfo {
pub kind: ErrorKind,
pub message: String,
pub status_code: Option<u16>,
pub is_retryable: bool,
pub provider_data: Option<JsonValue>,
}Expand description
Serializable projection of an Error carried in a stream.
Fields§
§kind: ErrorKindCoarse category.
message: StringDisplay message.
status_code: Option<u16>HTTP status when known.
is_retryable: boolWhether retrying may succeed.
provider_data: Option<JsonValue>Provider error payload when available.
Implementations§
Source§impl StreamErrorInfo
impl StreamErrorInfo
Sourcepub fn from_error(error: &Error) -> Self
pub fn from_error(error: &Error) -> Self
Projects an error.
Trait Implementations§
Source§impl Clone for StreamErrorInfo
impl Clone for StreamErrorInfo
Source§fn clone(&self) -> StreamErrorInfo
fn clone(&self) -> StreamErrorInfo
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 StreamErrorInfo
impl Debug for StreamErrorInfo
Source§impl<'de> Deserialize<'de> for StreamErrorInfo
impl<'de> Deserialize<'de> for StreamErrorInfo
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 From<&Error> for StreamErrorInfo
impl From<&Error> for StreamErrorInfo
Source§impl PartialEq for StreamErrorInfo
impl PartialEq for StreamErrorInfo
Source§impl Serialize for StreamErrorInfo
impl Serialize for StreamErrorInfo
impl StructuralPartialEq for StreamErrorInfo
Auto Trait Implementations§
impl Freeze for StreamErrorInfo
impl RefUnwindSafe for StreamErrorInfo
impl Send for StreamErrorInfo
impl Sync for StreamErrorInfo
impl Unpin for StreamErrorInfo
impl UnsafeUnpin for StreamErrorInfo
impl UnwindSafe for StreamErrorInfo
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