pub enum ResponseType {
Regular(Response),
}Expand description
An enum that represents either a regular response or a stream response. This allows the framework to handle both response types in a unified way.
Variants§
Implementations§
Source§impl ResponseType
impl ResponseType
Sourcepub fn from_regular(response: Response) -> ResponseType
pub fn from_regular(response: Response) -> ResponseType
Converts a regular response to the enum.
Sourcepub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
Gets the status code from the response regardless of type.
Sourcepub fn request_url(&self) -> &Url
pub fn request_url(&self) -> &Url
Gets the request URL from the response regardless of type.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ResponseType
impl !RefUnwindSafe for ResponseType
impl Send for ResponseType
impl Sync for ResponseType
impl Unpin for ResponseType
impl UnwindSafe for ResponseType
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