pub struct ValidatorEntityType {
pub descendants: HashSet<Name>,
/* private fields */
}Expand description
Contains entity type information for use by the validator. The contents of
the struct are the same as the schema entity type structure, but the
member_of relation is reversed to instead be descendants.
Fields§
§descendants: HashSet<Name>The set of entity types that can be members of this entity type. When this structure is initially constructed, the field will contain direct children, but it will be updated to contain the closure of all descendants before it is used in any validation.
Implementations§
source§impl ValidatorEntityType
impl ValidatorEntityType
sourcepub fn attr(&self, attr: &str) -> Option<&AttributeType>
pub fn attr(&self, attr: &str) -> Option<&AttributeType>
Get the type of the attribute with the given name, if it exists
sourcepub fn attributes(&self) -> impl Iterator<Item = (&SmolStr, &AttributeType)>
pub fn attributes(&self) -> impl Iterator<Item = (&SmolStr, &AttributeType)>
An iterator over the attributes of this entity
Trait Implementations§
source§impl Clone for ValidatorEntityType
impl Clone for ValidatorEntityType
source§fn clone(&self) -> ValidatorEntityType
fn clone(&self) -> ValidatorEntityType
Returns a copy 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 ValidatorEntityType
impl Debug for ValidatorEntityType
source§impl Serialize for ValidatorEntityType
impl Serialize for ValidatorEntityType
source§impl TCNode<Name> for ValidatorEntityType
impl TCNode<Name> for ValidatorEntityType
source§fn add_edge_to(&mut self, k: Name)
fn add_edge_to(&mut self, k: Name)
Add an edge out off this node to the node with key
k.source§fn out_edges(&self) -> Box<dyn Iterator<Item = &Name> + '_>
fn out_edges(&self) -> Box<dyn Iterator<Item = &Name> + '_>
Retrieve an iterator for the edges out of this node.
source§fn has_edge_to(&self, e: &Name) -> bool
fn has_edge_to(&self, e: &Name) -> bool
Return true when their is an edge between this node and the node with
key
k.Auto Trait Implementations§
impl RefUnwindSafe for ValidatorEntityType
impl Send for ValidatorEntityType
impl Sync for ValidatorEntityType
impl Unpin for ValidatorEntityType
impl UnwindSafe for ValidatorEntityType
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