use thiserror::Error;
use crate::prelude::*;
mod domain; pub use domain::*;
mod either ; pub use either ::*;
mod file ; pub use file ::*;
mod special_not_file; pub use special_not_file::*;
mod non_special ; pub use non_special ::*;
#[derive(Debug, Error)]
#[error("Failed to parse an IPv4 host.")]
pub struct InvalidIpv4Host;
#[derive(Debug, Error)]
#[error("Failed to parse an IPv6 host.")]
pub struct InvalidIpv6Host;
#[derive(Debug, Error)]
#[error("Failed to parse an opaque host.")]
pub struct InvalidOpaqueHost;
#[derive(Debug, Error)]
#[error("Failed to parse an empty host.")]
pub struct InvalidEmptyHost;
#[derive(Debug, Error)]
#[error("Failed to get a host.")]
pub struct NoHost;
#[derive(Debug, Error)]
#[error("Failed to get a domain.")]
pub struct NoDomain;
#[derive(Debug, Error)]
#[error("Attempted to set a URL that can't have a host to have a host.")]
pub struct CantHaveHost;
#[derive(Debug, Error)]
pub enum SetHostError {
#[error(transparent)] InvalidHost (#[from] InvalidHost ),
#[error(transparent)] SetDomainError(#[from] SetDomainError),
#[error(transparent)] NoDomain (#[from] NoDomain ),
#[error(transparent)] CantBeNone (#[from] CantBeNone ),
#[error(transparent)] CantBeEmpty (#[from] CantBeEmpty ),
#[error(transparent)] CantHaveHost (#[from] CantHaveHost ),
#[error(transparent)] TooLong (#[from] TooLong ),
}