pub struct SodotError(Repr);Expand description
Represents all possible errors that can occur when using the Sodot SDK.
SodotError provides comprehensive error handling for all operations in the SDK,
including validation failures, operation failures, and encoding errors.
Each error includes a descriptive message explaining what went wrong.
§Examples
use sodot_mpc::{SodotError, Ecdsa};
// Example of handling an error from MPC operations
let ecdsa = Ecdsa::new("invalid_host".to_string());
// This would typically result in an error during actual operations
// The error handling would look like this:
// match some_operation() {
// Ok(result) => println!("Success: {:?}", result),
// Err(error) => {
// println!("Error occurred: {}", error);
// // Error handling logic here
// }
// }
println!("Error handling example - see actual usage in examples/");Tuple Fields§
§0: ReprImplementations§
Trait Implementations§
Source§impl Debug for SodotError
impl Debug for SodotError
Source§impl Display for SodotError
impl Display for SodotError
Source§impl Error for SodotError
impl Error for SodotError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Infallible> for SodotError
impl From<Infallible> for SodotError
Source§fn from(inf: Infallible) -> Self
fn from(inf: Infallible) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SodotError
impl RefUnwindSafe for SodotError
impl Send for SodotError
impl Sync for SodotError
impl Unpin for SodotError
impl UnwindSafe for SodotError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more