If I try to define a box field IEvent, for example:
use stdweb::private::ConversionError;
use stdweb::web::event::IEvent;
struct Foo {
bar: Box<IEvent<Error = ConversionError>>,
}
I get an error message:
error[E0221]: ambiguous associated type `Error` in bounds of `stdweb::traits::IEvent`
--> src/events.rs:16:21
|
16 | bar: Box<IEvent<Error = ConversionError>>,
| ^^^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type `Error`
|
note: associated type `stdweb::traits::IEvent` could derive from `stdweb::unstable::TryFrom<stdweb::Reference>`
--> src/events.rs:16:21
|
16 | bar: Box<IEvent<Error = ConversionError>>,
| ^^^^^^^^^^^^^^^^^^^^^^^
note: associated type `stdweb::traits::IEvent` could derive from `stdweb::unstable::TryFrom<stdweb::Value>`
--> src/events.rs:16:21
|
16 | bar: Box<IEvent<Error = ConversionError>>,
| ^^^^^^^^^^^^^^^^^^^^^^^
If you want more information on this error, try using "rustc --explain E0221"
How to write syntax for setting related types Error(for signs TryFrom<Value>and TryFrom<Reference>)?
source
share