pub struct LocalResponse {
pub status_code: u16,
pub body: Vec<u8>,
pub headers: HashMap<String, String>,
}Expand description
Represents an HTTP response returned from an Axum router.
Fields§
§status_code: u16§body: Vec<u8>§headers: HashMap<String, String>Implementations§
Source§impl LocalResponse
impl LocalResponse
pub fn internal_server_error(error: impl Display) -> Self
Source§impl LocalResponse
impl LocalResponse
pub async fn from_response(response: Response) -> Self
Trait Implementations§
Source§impl Clone for LocalResponse
impl Clone for LocalResponse
Source§fn clone(&self) -> LocalResponse
fn clone(&self) -> LocalResponse
Returns a duplicate of the value. Read more
1.0.0 · 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 LocalResponse
impl Debug for LocalResponse
Source§impl<'de> Deserialize<'de> for LocalResponse
impl<'de> Deserialize<'de> for LocalResponse
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 LocalResponse
impl RefUnwindSafe for LocalResponse
impl Send for LocalResponse
impl Sync for LocalResponse
impl Unpin for LocalResponse
impl UnwindSafe for LocalResponse
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