Questions tagged [rust-result]
32 questions
0
votes
1 answer
Extending all Iterators- > to transform type
I'm trying to implement an extension trait for all Iterator- > where E is generic, to generate another Iterator over Result
, where the errors from the original are forwarded.
The problem is, that the transformation…

musicmatze
- 4,124
- 7
- 33
- 48
0
votes
1 answer
What's the idiomatic Rust way to wrap a non-error function with Result?
I have a function that parses a str to a number and returns it or an error
fn parse_str(text: &str) -> Result {
match text.parse::() {
Ok(value) => Ok(value),
_ => Err(SaleError::new(6010, 1999)),
…

Sassa
- 1,673
- 2
- 16
- 30