#[non_exhaustive]pub enum ResourceSpecificationKind {
Base,
Logical,
Physical,
Function,
Other,
}resource only.Expand description
The subclass of a ResourceSpecification, recovered from its @type.
Mirrors the entries of the v5 discriminator mapping, plus
ResourceSpecificationKind::Other so a vendor subclass never fails to
parse.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Base
The abstract base, carrying no subclass-specific member.
Logical
A logical resource — adds no member of its own.
Physical
A physical resource: model, part, sku, vendor.
Function
A network function: connection points and internal connectivity.
Other
A subclass this crate does not know.
Implementations§
Source§impl ResourceSpecificationKind
impl ResourceSpecificationKind
Sourcepub fn all() -> &'static [Self]
pub fn all() -> &'static [Self]
Every subclass the v5 documents declare, base first.
Excludes Other, which stands for a class the documents
do not declare. Checked against the specification’s own
discriminator.mapping by every_subclass_enumeration_is_the_declared_mapping
in tests/coverage.rs.
Sourcepub fn from_type_name(name: &str) -> Self
pub fn from_type_name(name: &str) -> Self
Maps a @type value to its kind; unknown names become Self::Other.
Sourcepub fn type_name(self) -> &'static str
pub fn type_name(self) -> &'static str
The canonical @type for this kind.
Self::Other has no canonical name and maps to the abstract base.
Trait Implementations§
Source§impl Clone for ResourceSpecificationKind
impl Clone for ResourceSpecificationKind
impl Copy for ResourceSpecificationKind
Source§impl Debug for ResourceSpecificationKind
impl Debug for ResourceSpecificationKind
impl Eq for ResourceSpecificationKind
Source§impl Hash for ResourceSpecificationKind
impl Hash for ResourceSpecificationKind
impl StructuralPartialEq for ResourceSpecificationKind
Auto Trait Implementations§
impl Forget for ResourceSpecificationKind
impl Freeze for ResourceSpecificationKind
impl Move for ResourceSpecificationKind
impl RefUnwindSafe for ResourceSpecificationKind
impl Send for ResourceSpecificationKind
impl Sync for ResourceSpecificationKind
impl Unpin for ResourceSpecificationKind
impl UnsafeUnpin for ResourceSpecificationKind
impl UnwindSafe for ResourceSpecificationKind
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
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§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
key and return true if they are equal.