You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not clear to me from the documentation how any of the async functions should be used. The documentation for AsyncDisplay says "It can do everything that a Display can do, but it doesn’t block and return values. Instead, it returns a Future". Apparently AsyncDisplay is implemented for BasicDisplay. The functions appear to live in AsyncDisplayFunctionsExt (which is in the prelude), but confusingly they are not in scope for an instance of BasicDisplay. Here is my test code which is the best I've been able to figure out so far.
use breadx::display::{DisplayBase,DisplayConnection,AsyncDisplay,CanBeAsyncDisplay};use breadx::prelude::*;pub(crate)asyncfnfoo(conn:&mutDisplayConnection){AsyncDisplayFunctionsExt::intern_atom_immediate(conn,false,b"foo").await.unwrap();}
This generates the error:
error[E0277]: the trait bound `BasicDisplay<BufConnection<NameConnection>>: AsyncDisplay` is not satisfied
--> src/test.rs:5:53
|
5 | AsyncDisplayFunctionsExt::intern_atom_immediate(conn, false, b"foo").await.unwrap();
| ----------------------------------------------- ^^^^ the trait `AsyncDisplay` is not implemented for `BasicDisplay<BufConnection<NameConnection>>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `AsyncDisplay`:
&CellDisplay<Dpy>
&mut D
Box<D>
CellDisplay<Dpy>
Can you please provide examples or documentation for how to use these functions?
The text was updated successfully, but these errors were encountered:
It is not clear to me from the documentation how any of the async functions should be used. The documentation for AsyncDisplay says "It can do everything that a Display can do, but it doesn’t block and return values. Instead, it returns a Future". Apparently AsyncDisplay is implemented for BasicDisplay. The functions appear to live in AsyncDisplayFunctionsExt (which is in the prelude), but confusingly they are not in scope for an instance of BasicDisplay. Here is my test code which is the best I've been able to figure out so far.
This generates the error:
Can you please provide examples or documentation for how to use these functions?
The text was updated successfully, but these errors were encountered: