Heavily customized version of smokesignal - https://whtwnd.com/kayrozen.com/3lpwe4ymowg2t
at main 40 lines 915 B view raw
1//! Error types for AT Protocol operations 2 3use thiserror::Error; 4 5/// Errors that can occur during AT URI parsing and validation 6#[derive(Error, Debug)] 7pub enum UriError { 8 #[error("Invalid AT URI format")] 9 InvalidFormat, 10 11 #[error("Repository component missing")] 12 RepositoryMissing, 13 14 #[error("Repository name too long")] 15 RepositoryTooLong, 16 17 #[error("Invalid repository format")] 18 InvalidRepository, 19 20 #[error("Collection component missing")] 21 CollectionMissing, 22 23 #[error("Collection name too long")] 24 CollectionTooLong, 25 26 #[error("Invalid collection format")] 27 InvalidCollection, 28 29 #[error("Record key missing")] 30 RkeyMissing, 31 32 #[error("Record key too long")] 33 RkeyTooLong, 34 35 #[error("Invalid record key format")] 36 InvalidRkey, 37 38 #[error("Path traversal attempt detected")] 39 PathTraversalAttempt, 40}