mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 12:31:22 +00:00
Implement Debug for JsFuture
This commit is contained in:
@ -104,6 +104,7 @@
|
||||
#![deny(missing_docs)]
|
||||
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::fmt;
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
|
||||
@ -128,6 +129,12 @@ pub struct JsFuture {
|
||||
callbacks: Option<(Closure<FnMut(JsValue)>, Closure<FnMut(JsValue)>)>,
|
||||
}
|
||||
|
||||
impl fmt::Debug for JsFuture {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "JsFuture {{ ... }}")
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Promise> for JsFuture {
|
||||
fn from(js: Promise) -> JsFuture {
|
||||
// Use the `then` method to schedule two callbacks, one for the
|
||||
|
Reference in New Issue
Block a user