Struct compose_spec::Name
source · pub struct Name(/* private fields */);Expand description
Validated Compose project name.
Names cannot be empty, they must start with a lowercase ASCII letter (a-z) or digit (0-9), and must only contain lowercase ASCII letters (a-z), digits (0-9), underscores (_), or dashes (-).
Implementations§
source§impl Name
impl Name
sourcepub fn new<T>(name: T) -> Result<Self, InvalidNameError>
pub fn new<T>(name: T) -> Result<Self, InvalidNameError>
Create a new Name, validating the given string.
§Errors
Returns an error if the given string is not a valid Name. Names cannot be empty, they
must start with a lowercase ASCII letter (a-z) or digit (0-9), and must only contain
lowercase ASCII letters (a-z), digits (0-9), underscores (_), or dashes (-).
Trait Implementations§
source§impl<'_de> Deserialize<'_de> for Name
impl<'_de> Deserialize<'_de> for Name
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 Ord for Name
impl Ord for Name
source§impl PartialEq for Name
impl PartialEq for Name
source§impl PartialOrd for Name
impl PartialOrd for Name
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Name
impl StructuralPartialEq for Name
Auto Trait Implementations§
impl Freeze for Name
impl RefUnwindSafe for Name
impl Send for Name
impl Sync for Name
impl Unpin for Name
impl UnwindSafe for Name
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.