pub struct OrgId(/* private fields */);Expand description
A validated org name: [a-z][a-z0-9-]{0,30}, not ending in -.
Implementations§
Source§impl OrgId
impl OrgId
pub fn new(s: impl Into<String>) -> Result<OrgId>
pub fn default_org() -> OrgId
pub fn as_str(&self) -> &str
pub fn is_default(&self) -> bool
Sourcepub fn incus_project(&self) -> String
pub fn incus_project(&self) -> String
The incus project holding this org: isb-<org>.
Sourcepub fn from_incus_project(project: &str) -> Option<OrgId>
pub fn from_incus_project(project: &str) -> Option<OrgId>
The org a project belongs to, if it is one of isb’s. incus’ own
default project is none.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OrgId
impl<'de> Deserialize<'de> for OrgId
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
impl Eq for OrgId
Source§impl Ord for OrgId
impl Ord for OrgId
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 OrgId
impl PartialOrd for OrgId
impl StructuralPartialEq for OrgId
Auto Trait Implementations§
impl Freeze for OrgId
impl RefUnwindSafe for OrgId
impl Send for OrgId
impl Sync for OrgId
impl Unpin for OrgId
impl UnsafeUnpin for OrgId
impl UnwindSafe for OrgId
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> 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.