pub enum AturiError {
MissingPrefix,
TrailingSlash,
AuthorityMissing,
HandleNotSupported,
AuthorityParsingFailed {
error: ResolveError,
},
CollectionMissing,
RecordKeyMissing,
EmptyCollection,
EmptyRecordKey,
}Expand description
Errors that can occur during AT-URI parsing and validation.
This enum covers all validation failures when parsing AT-URIs, including format violations, missing components, and invalid authority types.
Variants§
MissingPrefix
Error when AT-URI does not start with the required “at://” prefix.
This error occurs when the input string does not begin with the required AT-URI scheme identifier.
TrailingSlash
Error when AT-URI ends with a trailing slash.
This error occurs when the AT-URI string ends with a forward slash, which is not permitted in valid AT-URI format.
AuthorityMissing
Error when authority component is missing from AT-URI.
This error occurs when the AT-URI does not contain a valid authority component after the “at://” prefix.
HandleNotSupported
Error when authority is a handle instead of a DID.
This error occurs when the authority component is a handle rather than a DID, which is not supported for AT-URI operations.
AuthorityParsingFailed
Error when authority component cannot be parsed as a valid DID.
This error occurs when the authority component is not a valid handle or DID, or when DID parsing fails.
Fields
error: ResolveErrorThe underlying parsing error
CollectionMissing
Error when collection (NSID) component is missing from AT-URI.
This error occurs when the AT-URI does not contain a collection component after the authority.
RecordKeyMissing
Error when record key component is missing from AT-URI.
This error occurs when the AT-URI does not contain a record key component after the collection.
EmptyCollection
Error when collection (NSID) component is empty in AT-URI.
This error occurs when the AT-URI contains an empty or whitespace-only collection component, which is not valid.
EmptyRecordKey
Error when record key component is empty in AT-URI.
This error occurs when the AT-URI contains an empty or whitespace-only record key component, which is not valid.
Trait Implementations§
Source§impl Debug for AturiError
impl Debug for AturiError
Source§impl Display for AturiError
impl Display for AturiError
Source§impl Error for AturiError
impl Error for AturiError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ResolveError> for AturiError
impl From<ResolveError> for AturiError
Source§fn from(source: ResolveError) -> Self
fn from(source: ResolveError) -> Self
Auto Trait Implementations§
impl Freeze for AturiError
impl !RefUnwindSafe for AturiError
impl Send for AturiError
impl Sync for AturiError
impl Unpin for AturiError
impl UnsafeUnpin for AturiError
impl !UnwindSafe for AturiError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.