worker_sys::ext

Trait ResponseInitExt

source
pub trait ResponseInitExt {
    // Required methods
    fn websocket(&mut self, val: &WebSocket) -> Result<&mut Self, JsValue>;
    fn encode_body(&mut self, val: &str) -> Result<&mut Self, JsValue>;
    fn cf(&mut self, val: &JsValue) -> Result<&mut Self, JsValue>;
}

Required Methods§

source

fn websocket(&mut self, val: &WebSocket) -> Result<&mut Self, JsValue>

Change the webSocket field of this object.

source

fn encode_body(&mut self, val: &str) -> Result<&mut Self, JsValue>

Change the encodeBody field of this object.

source

fn cf(&mut self, val: &JsValue) -> Result<&mut Self, JsValue>

Change the cf field of this object.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ResponseInitExt for ResponseInit

source§

fn websocket(&mut self, val: &WebSocket) -> Result<&mut Self, JsValue>

source§

fn encode_body(&mut self, val: &str) -> Result<&mut Self, JsValue>

source§

fn cf(&mut self, val: &JsValue) -> Result<&mut Self, JsValue>

Implementors§