pub struct ElementTypeDescriptor {
pub type_id: TypeId,
pub required_labels: BTreeSet<LabelKey>,
pub forbidden_labels: BTreeMap<LabelKey, String>,
pub label_warnings: BTreeMap<LabelKey, String>,
pub provides_infrastructure: bool,
}Expand description
Metadata the compiler uses to validate an element of this type.
Fields§
§type_id: TypeIdCanonical type id.
required_labels: BTreeSet<LabelKey>Labels that elements of this type must carry.
forbidden_labels: BTreeMap<LabelKey, String>Labels that are forbidden on elements of this type, keyed by label with a message explaining why.
label_warnings: BTreeMap<LabelKey, String>Labels whose presence triggers a warning (not an error).
provides_infrastructure: booltrue if this type represents infrastructure (a node).
Implementations§
Source§impl ElementTypeDescriptor
impl ElementTypeDescriptor
Sourcepub fn builder() -> ElementTypeDescriptorBuilder
pub fn builder() -> ElementTypeDescriptorBuilder
Create an instance of ElementTypeDescriptor using the builder syntax
Trait Implementations§
Source§impl Clone for ElementTypeDescriptor
impl Clone for ElementTypeDescriptor
Source§fn clone(&self) -> ElementTypeDescriptor
fn clone(&self) -> ElementTypeDescriptor
Returns a duplicate of the value. Read more
1.0.0 · 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 ElementTypeDescriptor
impl Debug for ElementTypeDescriptor
Source§impl<'de> Deserialize<'de> for ElementTypeDescriptor
impl<'de> Deserialize<'de> for ElementTypeDescriptor
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 PartialEq for ElementTypeDescriptor
impl PartialEq for ElementTypeDescriptor
Source§impl Serialize for ElementTypeDescriptor
impl Serialize for ElementTypeDescriptor
impl Eq for ElementTypeDescriptor
impl StructuralPartialEq for ElementTypeDescriptor
Auto Trait Implementations§
impl Freeze for ElementTypeDescriptor
impl RefUnwindSafe for ElementTypeDescriptor
impl Send for ElementTypeDescriptor
impl Sync for ElementTypeDescriptor
impl Unpin for ElementTypeDescriptor
impl UnsafeUnpin for ElementTypeDescriptor
impl UnwindSafe for ElementTypeDescriptor
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§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.