pub struct MsgPack<T>(pub T, pub &'static str);Expand description
Sends 200 and MsgPack.
Tuple Fields§
§0: T§1: &'static strTrait Implementations§
Source§impl<T> EndpointOutRegister for MsgPack<T>
Available on crate feature salvo only.
impl<T> EndpointOutRegister for MsgPack<T>
Available on crate feature
salvo only.Source§fn register(components: &mut Components, operation: &mut Operation)
fn register(components: &mut Components, operation: &mut Operation)
Modify the OpenApi components section or current operation information with given argument. This function is called by macros internal.
Source§impl<T: Serialize + Send> ExplicitServerWrite for MsgPack<T>
Available on crate feature salvo and crate feature mresult and neither WebAssembly nor WebAssembly only.
impl<T: Serialize + Send> ExplicitServerWrite for MsgPack<T>
Available on crate feature
salvo and crate feature mresult and neither WebAssembly nor WebAssembly only.Source§async fn explicit_write(self, res: &mut Response)
async fn explicit_write(self, res: &mut Response)
Write an actual response in a
Response object.Source§impl<T: Serialize + Send> Writer for MsgPack<T>
impl<T: Serialize + Send> Writer for MsgPack<T>
Source§fn write<'life0, 'life1, 'life2, 'async_trait>(
self,
_req: &'life0 mut Request,
_depot: &'life1 mut Depot,
res: &'life2 mut Response,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write<'life0, 'life1, 'life2, 'async_trait>(
self,
_req: &'life0 mut Request,
_depot: &'life1 mut Depot,
res: &'life2 mut Response,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Write data to
Response.Auto Trait Implementations§
impl<T> Freeze for MsgPack<T>where
T: Freeze,
impl<T> RefUnwindSafe for MsgPack<T>where
T: RefUnwindSafe,
impl<T> Send for MsgPack<T>where
T: Send,
impl<T> Sync for MsgPack<T>where
T: Sync,
impl<T> Unpin for MsgPack<T>where
T: Unpin,
impl<T> UnwindSafe for MsgPack<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