use crate::traits::Vocabulary;
#[derive(Debug, Clone, thiserror::Error)]
pub enum VocabularyBuilderError<V: Vocabulary> {
#[error("Missing builder attribute: {0}")]
MissingAttribute(&'static str),
#[error("Unexpected number of symbols: expected {expected}, got {actual}")]
NumberOfSymbols {
expected: usize,
actual: usize,
},
#[error("Repeated source symbol: {0:?}")]
RepeatedSourceSymbol(V::SourceSymbol),
#[error("Repeated destination symbol: {0:?}")]
RepeatedDestinationSymbol(V::DestinationSymbol),
#[error("Sparse source node: {0:?}")]
SparseSourceNode(V::SourceSymbol),
#[error("Unordered destination node: {0:?}")]
UnorderedDestinationNode(V::DestinationSymbol),
}