pub trait ResponseMethods<D: DomTypes> {
Show 18 methods // Required methods fn Error(global: &GlobalScope, _can_gc: CanGc) -> Root<Dom<Response>>; fn Redirect( global: &GlobalScope, url: USVString, status: u16, _can_gc: CanGc, ) -> Result<Root<Dom<Response>>, Error>; fn Type(&self) -> ResponseType; fn Url(&self) -> USVString; fn Redirected(&self) -> bool; fn Status(&self) -> u16; fn Ok(&self) -> bool; fn StatusText(&self) -> ByteString; fn Headers(&self, _can_gc: CanGc) -> Root<Dom<Headers>>; fn Clone(&self, _can_gc: CanGc) -> Result<Root<Dom<Response>>, Error>; fn BodyUsed(&self) -> bool; fn GetBody(&self, cx: SafeJSContext) -> Option<NonNull<JSObject>>; fn ArrayBuffer(&self, _can_gc: CanGc) -> Rc<Promise>; fn Blob(&self, _can_gc: CanGc) -> Rc<Promise>; fn FormData(&self, _can_gc: CanGc) -> Rc<Promise>; fn Json(&self, _can_gc: CanGc) -> Rc<Promise>; fn Text(&self, _can_gc: CanGc) -> Rc<Promise>; fn Constructor( global: &GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, body: Option<ReadableStreamOrBlobOrArrayBufferViewOrArrayBufferOrFormDataOrStringOrURLSearchParams>, init: &ResponseInit, ) -> Result<Root<Dom<Response>>, Error>;
}

Required Methods§

source

fn Error(global: &GlobalScope, _can_gc: CanGc) -> Root<Dom<Response>>

source

fn Redirect( global: &GlobalScope, url: USVString, status: u16, _can_gc: CanGc, ) -> Result<Root<Dom<Response>>, Error>

source

fn Type(&self) -> ResponseType

source

fn Url(&self) -> USVString

source

fn Redirected(&self) -> bool

source

fn Status(&self) -> u16

source

fn Ok(&self) -> bool

source

fn StatusText(&self) -> ByteString

source

fn Headers(&self, _can_gc: CanGc) -> Root<Dom<Headers>>

source

fn Clone(&self, _can_gc: CanGc) -> Result<Root<Dom<Response>>, Error>

source

fn BodyUsed(&self) -> bool

source

fn GetBody(&self, cx: SafeJSContext) -> Option<NonNull<JSObject>>

source

fn ArrayBuffer(&self, _can_gc: CanGc) -> Rc<Promise>

source

fn Blob(&self, _can_gc: CanGc) -> Rc<Promise>

source

fn FormData(&self, _can_gc: CanGc) -> Rc<Promise>

source

fn Json(&self, _can_gc: CanGc) -> Rc<Promise>

source

fn Text(&self, _can_gc: CanGc) -> Rc<Promise>

source

fn Constructor( global: &GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, body: Option<ReadableStreamOrBlobOrArrayBufferViewOrArrayBufferOrFormDataOrStringOrURLSearchParams>, init: &ResponseInit, ) -> Result<Root<Dom<Response>>, Error>

Object Safety§

This trait is not object safe.

Implementors§