Replies: 1 comment 9 replies
-
Hi, you are welcome! I briefly checked that API (https://docs.rs/dom_query/latest/dom_query/struct.Document.html), and looks like it uses a lot of lifetime and borrows, which flutter_rust_bridge does not support yet (because there may be some weird semantics when using mutably borrowed type) but may support later. However, may I firstly know your use case? As a very simple example, suppose your use case is to simply let a = document.select("a:nth-child(3)");
let text: &str = &a.text(); Then it is totally OK to have a function like: fn select_text(query: &str) -> String {
document.select(query).text()
} On the other hand, if your scenario is very complex, then I will need to know a bit and then think about what to do to handle it. EDIT: The demo that I work with is in https://github.com/fzyzcjy/flutter_rust_bridge/tree/master/frb_example/integrate_third_party, which auto handles https://crates.io/crates/web-audio-api (a Rust api that mimics Web Audio standard but can work on native platforms). |
Beta Was this translation helpful? Give feedback.
-
I noticed that it exists recently but could you help me on how to use it, I am aware of having read the documentation concerning it and also the example but I am encountering some problems and also it is still unclear for especially me since I am a beginner in RUST. for the example I plan to use the crate
IS it possible to use it ?
Thank you for the hard work
Beta Was this translation helpful? Give feedback.
All reactions