Enum biliapi::Error [−][src]
pub enum Error { Network(Error), WebSocket(Error), StatusCode(StatusCode), Serde(Error), BiliCustom { code: i64, message: String, }, DataNotFound, Protocol(ParseError), }
Expand description
各种可能遇到的错误
Variants
在连接 http 的时候可能发生的错误
Tuple Fields of Network
0: Error
在连接 websocket 的时候可能发生的错误
在连接 http 的时候可能返回非 200 的返回码(如被频控、url 不存在)
Tuple Fields of StatusCode
0: StatusCode
在解析的时候期望的数据类型和实际的不匹配无法解析
Tuple Fields of Serde
0: Error
哔哩哔哩定义在 http 应用层之上的一个应用层错误
哔哩哔哩返回的结构中没有 data 字段
解析 websocket 协议时发生的错误
Tuple Fields of Protocol
0: ParseError
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
type Output = T
type Output = T
Should always be Self