monica_b1998@lemmy.world to Rust@programming.dev · 9 days agoError Handling in Rust vs. Exceptions in other languagesslicker.meexternal-linkmessage-square22fedilinkarrow-up134arrow-down11
arrow-up133arrow-down1external-linkError Handling in Rust vs. Exceptions in other languagesslicker.memonica_b1998@lemmy.world to Rust@programming.dev · 9 days agomessage-square22fedilink
minus-squarejenesaisquoi@feddit.orglinkfedilinkEnglisharrow-up1·6 days agoYou can do type erasure by converting your errors to Box<dyn Error>, then they have the same type and can be in the same enum variant
You can do type erasure by converting your errors to
Box<dyn Error>, then they have the same type and can be in the same enum variant