Comments (5)
For now the workaround I've found is just to map_err
and create a new error that includes the Debug print of the original varlink error:
service.run_hook("test-hook".to_string()).call().map_err(|e| {
// The anyhow! macro creates a new error with a string message
anyhow::anyhow!("Error running hook: {:?}", e)
})?;
from rust.
So I'm realizing that the problem is that Anyhow errors are required to be Sync + Send, but the errors that varlink is giving me are not. Is it possible to make the varlink errors Sync + Send or is this something I should bring to the anyhow project about deriving from non-Sync errors?
from rust.
Fixed this with eba2926
Will publish crates to crates.io with new major versions.
from rust.
published
from rust.
Oh, sweet! Thanks.
It worked perfect.
from rust.
Related Issues (20)
- varlink 3.1.0 broke API
- Parser error HOT 7
- Updating from varlink 1.1.0 to varlink 7.0.0 auto code generation compile errors HOT 4
- Question on the names of returned variables HOT 1
- Question: which license can I use for varlink_grammar.peg HOT 5
- Does not compile on 32-bit Windows HOT 1
- Error without Box
- Recommended Way to Shutdown Varlink Server? HOT 5
- Please tag v10.0.0 HOT 1
- varlink_derive compilation error: proc_macro only usable with crates of the proc-macro crate type HOT 2
- [Question] Overriding Display for Error Types? HOT 4
- null is not deserialized correctly HOT 3
- Worker thread exhaustion HOT 3
- [Question] stdin/stdout of varlink service HOT 4
- Please expand `varlink::ListenConfig` to support socker permission HOT 2
- test_generate fails with recent rust stack HOT 1
- custom {de,}serialization HOT 2
- Provide listen() variant that accepts listener HOT 4
- Access SO_PASSCRED credentials in handler
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.