Closed aruddy-slb closed 2 years ago
Can this be worked around using the anyhow crate like so?
fn read_tag() -> anyhow::Result<i32> {
let tag = EPath::parse_tag("my tag name")?;
let value: TagValue<i32> = client
.read_tag(tag.clone())
.await
.context("Failed to read tag!")?;
Ok(value.value)
}
But I agree it would be nice if it was fixed :)
It ain't pretty, but I fixed the issue (I think? It compiles anyways) here: https://github.com/simonkampe/eip-rs
let me try
I have worked through the example you provided in the ReadMe, and it works great! I can read/write tags without a hitch.
The issue arises when I attempt to create a background task to handle the reading/writing of tags. Rust Analyzer gives me the following error:
However, in the docs, it specifically says that ClientError is Send and TagValue is Send so long as T is also Send. This might just be my inexperience with tokio, but I am wondering if you could shed some light on how to do this properly.
Here is my sample code:
Thank you in advance!