pub enum RecordKeyError {
Empty,
TooLong(usize),
InvalidCharacter(char),
RelativePath(String),
}Expand description
Why a string is not a usable record key.
Variants§
Empty
Empty, which would make the record unaddressable.
TooLong(usize)
Over MAX_RECORD_KEY_LENGTH characters.
InvalidCharacter(char)
A character outside A-Za-z0-9._:~-.
RelativePath(String)
The key is . or ...
Both are legal under the character rule and both are path traversal
waiting to happen, because a record key is the last segment of an
at:// URI and of many implementations’ file layouts.
Trait Implementations§
Source§impl Clone for RecordKeyError
impl Clone for RecordKeyError
Source§fn clone(&self) -> RecordKeyError
fn clone(&self) -> RecordKeyError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RecordKeyError
impl Debug for RecordKeyError
Source§impl Display for RecordKeyError
impl Display for RecordKeyError
Source§impl Error for RecordKeyError
impl Error for RecordKeyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for RecordKeyError
impl PartialEq for RecordKeyError
Source§fn eq(&self, other: &RecordKeyError) -> bool
fn eq(&self, other: &RecordKeyError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for RecordKeyError
impl StructuralPartialEq for RecordKeyError
Auto Trait Implementations§
impl Freeze for RecordKeyError
impl RefUnwindSafe for RecordKeyError
impl Send for RecordKeyError
impl Sync for RecordKeyError
impl Unpin for RecordKeyError
impl UnsafeUnpin for RecordKeyError
impl UnwindSafe for RecordKeyError
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.