iri_string/spec.rs
1//! IRI specs.
2
3use core::fmt;
4
5// Note that this MUST be private module.
6// See <https://rust-lang.github.io/api-guidelines/future-proofing.html> about
7// sealed trait.
8mod internal;
9
10/// A trait for spec types.
11///
12/// This trait is not intended to be implemented by crate users.
13// Note that all types which implement `Spec` also implement `SpecInternal`.
14pub trait Spec: internal::Sealed + Copy + fmt::Debug {}
15
16/// A type that represents specification of IRI.
17///
18/// About IRI, see [RFC 3987].
19///
20/// [RFC 3987]: https://tools.ietf.org/html/rfc3987
21#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
22pub enum IriSpec {}
23
24impl Spec for IriSpec {}
25
26/// A type that represents specification of URI.
27///
28/// About URI, see [RFC 3986].
29///
30/// [RFC 3986]: https://tools.ietf.org/html/rfc3986
31#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
32pub enum UriSpec {}
33
34impl Spec for UriSpec {}