pub struct LingerError { /* private fields */ }Expand description
EN: Structured error returned by SDK operations. 中文:SDK 操作返回的结构化错误。
Implementations§
Source§impl LingerError
impl LingerError
Sourcepub fn serialization(message: impl Into<String>) -> Self
pub fn serialization(message: impl Into<String>) -> Self
EN: Creates a serialization or deserialization error. 中文:创建序列化或反序列化错误。
Sourcepub fn streaming(message: impl Into<String>) -> Self
pub fn streaming(message: impl Into<String>) -> Self
EN: Creates a streaming error. 中文:创建流式解析错误。
Sourcepub fn invalid_config(message: impl Into<String>) -> Self
pub fn invalid_config(message: impl Into<String>) -> Self
EN: Creates an invalid configuration error. 中文:创建无效配置错误。
Sourcepub fn api(
status: u16,
headers: HeaderMap,
request_id: Option<RequestId>,
error: ApiErrorBody,
) -> Self
pub fn api( status: u16, headers: HeaderMap, request_id: Option<RequestId>, error: ApiErrorBody, ) -> Self
EN: Creates an API error from response parts. 中文:通过响应组成部分创建 API 错误。
Sourcepub fn retry_exhausted(attempts: usize, last_error: LingerError) -> Self
pub fn retry_exhausted(attempts: usize, last_error: LingerError) -> Self
EN: Creates a retry exhaustion error. 中文:创建重试耗尽错误。
Trait Implementations§
Source§impl Debug for LingerError
impl Debug for LingerError
Source§impl Display for LingerError
impl Display for LingerError
Source§impl Error for LingerError
impl Error for LingerError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for LingerError
impl RefUnwindSafe for LingerError
impl Send for LingerError
impl Sync for LingerError
impl Unpin for LingerError
impl UnsafeUnpin for LingerError
impl UnwindSafe for LingerError
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