pub struct RawResponse {
pub code: i32,
pub msg: String,
pub request_id: Option<String>,
pub data: Option<Value>,
pub error: Option<ErrorInfo>,
}Expand description
原始响应数据
code 是双域共槽:
- 飞书业务信封:装入飞书
code字段(可为 9 位 i32,如99991663); - HTTP 非 2xx 且无信封:装入合成 HTTP status(如 429/500)。
crate::error::ErrorCode::from_code 同时含 HTTP status 臂与飞书业务码臂,是双域共槽
行为正确的依据——不要因命名困惑而拆字段;拆共槽属另案(ADR-0004 非目标)。
Fields§
§code: i32响应代码(双域共槽:飞书业务码或合成 HTTP status;见结构体文档)
msg: String响应消息
request_id: Option<String>请求数据ID
data: Option<Value>额外数据
error: Option<ErrorInfo>错误信息
Implementations§
Source§impl RawResponse
impl RawResponse
Trait Implementations§
Source§impl Clone for RawResponse
impl Clone for RawResponse
Source§fn clone(&self) -> RawResponse
fn clone(&self) -> RawResponse
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 RawResponse
impl Debug for RawResponse
Source§impl Default for RawResponse
impl Default for RawResponse
Source§impl<'de> Deserialize<'de> for RawResponse
impl<'de> Deserialize<'de> for RawResponse
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 RawResponse
impl RefUnwindSafe for RawResponse
impl Send for RawResponse
impl Sync for RawResponse
impl Unpin for RawResponse
impl UnsafeUnpin for RawResponse
impl UnwindSafe for RawResponse
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