use crate::bounded::NonEmpty;
#[path = "type_guard.rs"]
mod guard;
pub const PATH_SEGMENT_LIMIT: usize = crate::token::RENDERED_PATH_SEGMENT_LIMIT;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SchemaId([u8; 32]);
pub const EXPECTED_SCHEMA_ID: SchemaId = SchemaId::pinned([
185, 251, 251, 45, 168, 146, 85, 42, 248, 177, 196, 48, 117, 229, 207, 5, 84, 120, 104, 25,
150, 41, 202, 2, 243, 73, 31, 148, 241, 22, 122, 34,
]);
crate::roster! {
pub enum CrateFacing {
Declaring = "declaring",
Harness = "harness",
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub(crate) enum DeclaringBinding {
Absent,
Required,
}
crate::roster! {
pub enum DeliveryForm {
Trials = "trials",
Benches = "benches",
}
}
#[must_use = "a declaration refusal names the exact seat the declaration did not fill"]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum DeclarationError {
EmptyNamespace,
EmptyStem,
SpellingNotAnIdentifier,
PathSegmentsAbsent,
PathSegmentsUnbounded,
}
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct WallName {
namespace: String,
stem: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct BoundPath {
facing: CrateFacing,
segments: NonEmpty<String, PATH_SEGMENT_LIMIT>,
}
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct SupportName(String);
pub use guard::{rendered_identifier, rendered_name};