pub struct ApiResponse<T: Serialize> {
pub ret_type: i32,
pub ret_msg: Option<String>,
pub data: Option<T>,
}Expand description
通用响应格式(包装 proto 响应,加 ret_type/ret_msg)
Fields§
§ret_type: i32§ret_msg: Option<String>§data: Option<T>Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ApiResponse<T>where
T: Freeze,
impl<T> RefUnwindSafe for ApiResponse<T>where
T: RefUnwindSafe,
impl<T> Send for ApiResponse<T>where
T: Send,
impl<T> Sync for ApiResponse<T>where
T: Sync,
impl<T> Unpin for ApiResponse<T>where
T: Unpin,
impl<T> UnwindSafe for ApiResponse<T>where
T: UnwindSafe,
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