pub fn copy_to_clipboard(
    view: impl Future<Output = Result<web_sys::Blob, JsValue>>,
    mimetype: MimeType,
) -> impl Future<Output = Result<(), JsValue>> {
    let js_ref: Rc<RefCell<Option<web_sys::Blob>>> = Rc::new(RefCell::new(None));
    poll(0, mimetype, js_ref.clone()).unwrap();
    async move {
        let js_val = view.await?;
        *js_ref.borrow_mut() = Some(js_val);
        Ok(())
    }
}
/// Copy a `JsPerspectiveView` to the clipboard as a CSV.
Copy a `JsPerspectiveView` to the clipboard as a CSV.
Copy a ` JsPerspectiveView ` to the clipboard as a CSV .
pub fn copy_to_clipboard(
    view: impl Future<Output = Result<web_sys::Blob, JsValue>>,
    mimetype: MimeType,
) -> impl Future<Output = Result<(), JsValue>> {
    let js_ref: Rc<RefCell<Option<web_sys::Blob>>> = Rc::new(RefCell::new(None));
    poll(0, mimetype, js_ref.clone()).unwrap();
    async move {
        let js_val = view.await?;
        *js_ref.borrow_mut() = Some(js_val);
        Ok(())
    }
}
pub fn copy_to_clipboard ( view : impl Future < Output = Result < web_sys :: Blob , JsValue > > , mimetype : MimeType , ) -> impl Future < Output = Result < ( ) , JsValue > > { let js_ref : Rc < RefCell < Option < web_sys :: Blob > > > = Rc :: new ( RefCell :: new ( None ) ) ; poll ( 0 , mimetype , js_ref . clone ( ) ) . unwrap ( ) ; async move { let js_val = view . await ? ; * js_ref . borrow_mut ( ) = Some ( js_val ) ; Ok ( ( ) ) } }
Copy a `JsPerspectiveView` to the clipboard as a CSV.
Copy a ` JsPerspectiveView ` to the clipboard as a CSV .
view
impl Future<Output = Result<web_sys::Blob, JsValue>>
mimetype
MimeType
view
impl Future<Output = Result<web_sys::Blob, JsValue>>
mimetype
MimeType