Module error

Source
Expand description

Error types for the Ribbit client

This module defines the error types that can occur when using the Ribbit client.

§Example

use ribbit_client::{Error, Result, Region};
use std::str::FromStr;

fn example() -> Result<()> {
    // This would return an InvalidRegion error
    match Region::from_str("invalid") {
        Ok(region) => Ok(()),
        Err(e) => Err(e),
    }
}

// Example of error handling
let result = example();
assert!(result.is_err());

Enums§

Error
Error types that can occur when using the Ribbit client

Type Aliases§

Result
Result type alias using the Ribbit Error type