pub struct RunName(/* private fields */);Expand description
A run’s name: 1 to 63 lowercase letters, digits, - or _, starting with a letter or digit
(Compose’s rule for a project name), and not a Windows device name (con, nul, com1…),
which can’t name a folder there.
Implementations§
Source§impl RunName
impl RunName
Sourcepub fn from_folder(dir: &Path) -> Result<RunName>
pub fn from_folder(dir: &Path) -> Result<RunName>
The name a project in folder dir runs as when none is given: the folder’s name in
lower case, each character a run name can’t hold as -, cut to the longest a name takes
(Compose names a project after its folder the same way).
§Errors
run_name when nothing of the folder’s name is left that can name a run.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunName
impl<'de> Deserialize<'de> for RunName
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<RunName, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<RunName, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RunName
Source§impl Ord for RunName
impl Ord for RunName
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for RunName
impl PartialOrd for RunName
impl StructuralPartialEq for RunName
Auto Trait Implementations§
impl Forget for RunName
impl Freeze for RunName
impl Move for RunName
impl RefUnwindSafe for RunName
impl Send for RunName
impl Sync for RunName
impl Unpin for RunName
impl UnsafeUnpin for RunName
impl UnwindSafe for RunName
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.