pub struct JsonRows(pub QueryRows);Expand description
包装 QueryRows 实现 Responder
QueryRows = Vec<HashMap<String, Value>>,逐字段转换为 JSON 对象数组。
Tuple Fields§
§0: QueryRowsTrait Implementations§
Source§impl Responder for JsonRows
impl Responder for JsonRows
type Body = BoxBody
Source§fn respond_to(self, _: &HttpRequest) -> HttpResponse
fn respond_to(self, _: &HttpRequest) -> HttpResponse
Convert self to
HttpResponse.Auto Trait Implementations§
impl Freeze for JsonRows
impl RefUnwindSafe for JsonRows
impl Send for JsonRows
impl Sync for JsonRows
impl Unpin for JsonRows
impl UnsafeUnpin for JsonRows
impl UnwindSafe for JsonRows
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