pub struct NextResponse {
pub status: u16,
pub headers: HashMap<String, String>,
pub cookies: Vec<SetCookie>,
pub body: Option<String>,
}Fields§
§status: u16§headers: HashMap<String, String>§body: Option<String>Implementations§
Source§impl NextResponse
impl NextResponse
pub fn next() -> MiddlewareResult
pub fn redirect(url: impl Into<String>) -> MiddlewareResult
pub fn redirect_permanent(url: impl Into<String>) -> MiddlewareResult
pub fn rewrite(url: impl Into<String>) -> MiddlewareResult
pub fn new(status: u16) -> Self
pub fn with_header( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn with_body(self, body: impl Into<String>) -> Self
pub fn into_result(self) -> MiddlewareResult
Trait Implementations§
Source§impl Clone for NextResponse
impl Clone for NextResponse
Source§fn clone(&self) -> NextResponse
fn clone(&self) -> NextResponse
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 moreAuto Trait Implementations§
impl Freeze for NextResponse
impl RefUnwindSafe for NextResponse
impl Send for NextResponse
impl Sync for NextResponse
impl Unpin for NextResponse
impl UnwindSafe for NextResponse
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