ResponseInitExt

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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§