#[non_exhaustive]pub enum DistroError {
Empty,
TooLong(usize),
InvalidFirstCharacter,
InvalidCharacter,
}Available on crate feature
sys only.Expand description
Error type for distribution name parsing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
Empty distribution name
The provided string is empty. Distribution names must contain at least one character.
TooLong(usize)
Distribution name too long (max 64 characters)
Distribution names must not exceed 64 characters. This variant contains the actual length of the provided distribution name.
InvalidFirstCharacter
Invalid first character (must be alphanumeric)
Distribution names must start with an alphanumeric character (letter or digit). Spaces, hyphens, and underscores are not allowed as the first character.
InvalidCharacter
Invalid character in distribution name
Distribution names can only contain ASCII letters, digits, spaces, hyphens, and underscores. This variant indicates an invalid character was found.
Trait Implementations§
Source§impl Clone for DistroError
impl Clone for DistroError
Source§fn clone(&self) -> DistroError
fn clone(&self) -> DistroError
Returns a duplicate of the value. Read more
1.0.0 · 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 DistroError
impl Debug for DistroError
Source§impl<'de> Deserialize<'de> for DistroError
impl<'de> Deserialize<'de> for DistroError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DistroError
impl Display for DistroError
Source§impl Error for DistroError
Available on crate feature std only.
impl Error for DistroError
Available on crate feature
std only.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 DistroError
impl PartialEq for DistroError
Source§impl Serialize for DistroError
impl Serialize for DistroError
impl Copy for DistroError
impl Eq for DistroError
impl StructuralPartialEq for DistroError
Auto Trait Implementations§
impl Freeze for DistroError
impl RefUnwindSafe for DistroError
impl Send for DistroError
impl Sync for DistroError
impl Unpin for DistroError
impl UnwindSafe for DistroError
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