pub enum EntityType {
Resource,
Parameter,
Output,
Mapping,
Metadata,
Rule,
Condition,
Transform,
FormatVersion,
Description,
}Expand description
The kind of template entity a diagnostic targets - the singular form of the top-level section the entity is declared in. Every documented section has a variant; the ones whose children are addressable by logical ID (resources, parameters, outputs, mappings, conditions, rules, and metadata keys) are the ones diagnostics attribute findings to today.
Variants§
Implementations§
Source§impl EntityType
impl EntityType
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
The entity type’s name - the singular form used in serialized diagnostics and filter configurations.
Sourcepub const fn section(self) -> TopLevelSection
pub const fn section(self) -> TopLevelSection
The top-level template section this kind of entity is declared in.
Sourcepub fn from_section(section: &str) -> Option<EntityType>
pub fn from_section(section: &str) -> Option<EntityType>
Maps a top-level template section name to the entity type of its
children. Returns None for keys that are not documented sections.
Trait Implementations§
Source§impl Clone for EntityType
impl Clone for EntityType
Source§fn clone(&self) -> EntityType
fn clone(&self) -> EntityType
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 moreimpl Copy for EntityType
Source§impl Debug for EntityType
impl Debug for EntityType
Source§impl<'de> Deserialize<'de> for EntityType
impl<'de> Deserialize<'de> for EntityType
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 EntityType
Source§impl FromStr for EntityType
impl FromStr for EntityType
Source§impl Hash for EntityType
impl Hash for EntityType
Source§impl PartialEq for EntityType
impl PartialEq for EntityType
Source§impl Serialize for EntityType
impl Serialize for EntityType
impl StructuralPartialEq for EntityType
Auto Trait Implementations§
impl Freeze for EntityType
impl RefUnwindSafe for EntityType
impl Send for EntityType
impl Sync for EntityType
impl Unpin for EntityType
impl UnsafeUnpin for EntityType
impl UnwindSafe for EntityType
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,
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.