pub struct ProviderConfigId { /* private fields */ }Expand description
Identifier for one provider-config section. Bare slug (“digitalocean”) when it is the only config for that provider; provider+label (“digitalocean:work”) when multiple configs coexist for the same provider.
The label charset is strict ([a-z0-9-], max 32) so the :-separator in the
# purple:provider <id>:<server_id> SSH marker stays unambiguous even if
future server IDs contain colons.
Fields are pub(crate) so external callers can’t construct an invalid id
by direct field mutation. Use bare(), labeled() or FromStr. The
internal placeholder pattern in the add-flow (constructing with an empty
label, then filling it via the form) lives within the crate and is
validated again by ProviderConfig::save() before reaching disk.
Implementations§
Trait Implementations§
Source§impl Clone for ProviderConfigId
impl Clone for ProviderConfigId
Source§fn clone(&self) -> ProviderConfigId
fn clone(&self) -> ProviderConfigId
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 ProviderConfigId
impl Debug for ProviderConfigId
Source§impl Default for ProviderConfigId
impl Default for ProviderConfigId
Source§impl Display for ProviderConfigId
impl Display for ProviderConfigId
Source§impl FromStr for ProviderConfigId
impl FromStr for ProviderConfigId
Source§impl Hash for ProviderConfigId
impl Hash for ProviderConfigId
Source§impl PartialEq for ProviderConfigId
impl PartialEq for ProviderConfigId
Source§fn eq(&self, other: &ProviderConfigId) -> bool
fn eq(&self, other: &ProviderConfigId) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ProviderConfigId
impl StructuralPartialEq for ProviderConfigId
Auto Trait Implementations§
impl Freeze for ProviderConfigId
impl RefUnwindSafe for ProviderConfigId
impl Send for ProviderConfigId
impl Sync for ProviderConfigId
impl Unpin for ProviderConfigId
impl UnsafeUnpin for ProviderConfigId
impl UnwindSafe for ProviderConfigId
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> 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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more