Expand description
§Error Types
This module provides a comprehensive set of error types used throughout the gooty-proxy crate. Each error type is designed to encapsulate specific failure modes for different subsystems.
§Overview
The module contains several error enums, each focused on a specific domain:
CidrError: For errors related to CIDR notation and subnet operationsRequestorError: For HTTP request related failuresFilestoreError: For disk operations and file management errorsConfigError: For configuration parsing and validation errorsProxyError: For proxy-specific validation and connection errorsSourceError: For proxy source acquisition failuresJudgementError: For proxy validation and testing errorsUtilError: For general utility function failuresOwnershipError: For ASN and organization lookup failuresSleuthError: For IP investigation failuresManagerError: For high-level proxy management errors
Each error type has a corresponding Result type alias for more convenient function signatures.
§Examples
use gooty_proxy::definitions::errors::{CidrError, CidrResult};
fn parse_cidr(input: &str) -> CidrResult<()> {
if !input.contains('/') {
return Err(CidrError::InvalidFormat("Missing prefix".to_string()));
}
// Additional parsing logic...
Ok(())
}Enums§
- Cidr
Error - Represents error types that can occur during CIDR operations.
- Config
Error - Errors that can occur during configuration operations
- Filestore
Error - Errors that can occur in the filestore
- Judgement
Error - Error types that can occur during proxy judgement
- Manager
Error - Errors that can occur in the proxy manager
- Ownership
Error - Error types that can occur during ASN and organization lookups
- Proxy
Error - Errors that can occur when validating or working with proxies
- Requestor
Error - Error types that can occur during HTTP requests
- Sleuth
Error - Errors that can occur during IP lookup operations
- Source
Error - Represents an error that can occur when working with proxy sources
- Util
Error - Error types for utility functions
Type Aliases§
- Cidr
Result - Result type for CIDR operations
- Config
Result - Result type for configuration operations
- Filestore
Result - Result type for filestore operations
- Judgement
Result - Result type for judgement operations
- Manager
Result - Result type for proxy manager operations
- Ownership
Result - Result type for ownership operations
- Request
Result - Result type for HTTP requests
- Sleuth
Result - Result type for Sleuth operations
- Source
Result - Result type for source operations
- Util
Result - Result type for utility functions