pub struct EcosystemId(/* private fields */);Expand description
Stable, serializable identity for a built-in or plugin-provided ecosystem.
Implementations§
Source§impl EcosystemId
impl EcosystemId
pub const MAX_LENGTH: usize = 128
pub const RUST: Self
pub const NODE: Self
pub const PYTHON: Self
pub const CPP: Self
pub const Rust: Self = Self::RUST
👎Deprecated:
use EcosystemId::RUST
pub const Node: Self = Self::NODE
👎Deprecated:
use EcosystemId::NODE
pub const Python: Self = Self::PYTHON
👎Deprecated:
use EcosystemId::PYTHON
pub const Cpp: Self = Self::CPP
👎Deprecated:
use EcosystemId::CPP
Sourcepub fn new(value: impl Into<String>) -> Result<Self, EcosystemIdError>
pub fn new(value: impl Into<String>) -> Result<Self, EcosystemIdError>
Creates and validates an ecosystem identifier.
Identifiers use lowercase ASCII segments separated by dots. Segments may contain digits and hyphens, but must start with a letter and end with a letter or digit.
pub fn as_str(&self) -> &str
pub fn is_builtin(&self) -> bool
pub fn display_name(&self) -> &str
Trait Implementations§
Source§impl Clone for EcosystemId
impl Clone for EcosystemId
Source§fn clone(&self) -> EcosystemId
fn clone(&self) -> EcosystemId
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 EcosystemId
impl Debug for EcosystemId
Source§impl<'de> Deserialize<'de> for EcosystemId
impl<'de> Deserialize<'de> for EcosystemId
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 Display for EcosystemId
impl Display for EcosystemId
impl Eq for EcosystemId
Source§impl FromStr for EcosystemId
impl FromStr for EcosystemId
Source§impl Hash for EcosystemId
impl Hash for EcosystemId
Source§impl Ord for EcosystemId
impl Ord for EcosystemId
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
Source§impl PartialEq for EcosystemId
impl PartialEq for EcosystemId
Source§impl PartialOrd for EcosystemId
impl PartialOrd for EcosystemId
Source§impl Serialize for EcosystemId
impl Serialize for EcosystemId
impl StructuralPartialEq for EcosystemId
Auto Trait Implementations§
impl Freeze for EcosystemId
impl RefUnwindSafe for EcosystemId
impl Send for EcosystemId
impl Sync for EcosystemId
impl Unpin for EcosystemId
impl UnsafeUnpin for EcosystemId
impl UnwindSafe for EcosystemId
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