pub struct Children {
pub multiple: bool,
pub required: bool,
pub types: VecSet<NodeName>,
}Expand description
Describes a node’s named children: their types and quantity.
“Quantity” here means:
- Zero
- Zero to one
- Zero to many
- Exactly one
- One to many
Unchecked invariant: if types is empty, multiple and required must be false.
Fields§
§multiple: boolIf true, there can be more than one child.
required: boolIf false, there can be zero children.
types: VecSet<NodeName>Possible types of children.
Additionally, if this is empty, that means there are no children.
Implementations§
Trait Implementations§
Source§impl BitOrAssign for Children
impl BitOrAssign for Children
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the
|= operation. Read moreSource§impl<'de> Deserialize<'de> for Children
impl<'de> Deserialize<'de> for Children
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
Auto Trait Implementations§
impl Freeze for Children
impl RefUnwindSafe for Children
impl Send for Children
impl Sync for Children
impl Unpin for Children
impl UnwindSafe for Children
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