pub fn finish(self) -> js_sys::Promise {
        let stream = self.stream;
        wasm_bindgen_futures::future_to_promise(async move {
            let writer = stream.get_writer().unwrap();
            JsFuture::from(writer.write(js_sys::Uint8Array::from(vec![0; 1024].as_slice()).into()))
                .await
                .unwrap();
            JsFuture::from(writer.close()).await.unwrap();
            writer.release_lock();
            Ok(JsValue::from(stream))
        })
    }
/// Finishes the pack and closes the writer. After this is called no other method may be called on the packer.
Finishes the pack and closes the writer. After this is called no other method may be called on the packer.
Finishes the pack and closes the writer . After this is called no other method may be called on the packer .
pub fn finish(self) -> js_sys::Promise {
        let stream = self.stream;
        wasm_bindgen_futures::future_to_promise(async move {
            let writer = stream.get_writer().unwrap();
            JsFuture::from(writer.write(js_sys::Uint8Array::from(vec![0; 1024].as_slice()).into()))
                .await
                .unwrap();
            JsFuture::from(writer.close()).await.unwrap();
            writer.release_lock();
            Ok(JsValue::from(stream))
        })
    }
pub fn finish ( self ) -> js_sys :: Promise { let stream = self . stream ; wasm_bindgen_futures :: future_to_promise ( async move { let writer = stream . get_writer ( ) . unwrap ( ) ; JsFuture :: from ( writer . write ( js_sys :: Uint8Array :: from ( vec ! [ 0 1024 ] . as_slice ( ) ) . into ( ) ) ) . await . unwrap ( ) ; JsFuture :: from ( writer . close ( ) ) . await . unwrap ( ) ; writer . release_lock ( ) ; Ok ( JsValue :: from ( stream ) ) } ) }
Finishes the pack and closes the writer.
Finishes the pack and closes the writer .
self
self