Trait script::dom::bindings::codegen::Bindings::ResponseBinding::Response_Binding::ResponseMethods
source · 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§
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>
Object Safety§
This trait is not object safe.