pub enum BadName {
Empty,
Escapes,
DrivePrefix,
Reserved,
ForbiddenChar(char),
TrailingDotOrSpace,
}Expand description
Why validate_name refuses a profile name.
Not #[non_exhaustive], for the reason BadProfile gives.
Variants§
Empty
The name is empty.
Escapes
The name is . or .., or contains / or \, so it could resolve
outside the profiles directory.
DrivePrefix
The name starts with a drive letter and a colon (C:foo), which Windows
resolves on that drive instead of under the profiles directory.
Reserved
A Windows device name (CON, PRN, AUX, NUL, COM1-COM9,
LPT1-LPT9, and COM/LPT with a superscript ¹, ², or ³), in
any case, alone or followed by an extension.
ForbiddenChar(char)
A character Windows forbids in a folder name: < > : " | ? * or a
control character.
TrailingDotOrSpace
The name ends with . or a space, which Windows strips.
Trait Implementations§
impl Eq for BadName
impl StructuralPartialEq for BadName
Auto Trait Implementations§
impl Forget for BadName
impl Freeze for BadName
impl Move for BadName
impl RefUnwindSafe for BadName
impl Send for BadName
impl Sync for BadName
impl Unpin for BadName
impl UnsafeUnpin for BadName
impl UnwindSafe for BadName
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.