pub trait ParentElementTyped {
type Child;
// Required method
fn extend(&mut self, elements: impl IntoIterator<Item = Self::Child>);
// Provided methods
fn child(self, child: Self::Child) -> Self
where Self: Sized { ... }
fn children(self, children: impl IntoIterator<Item = Self::Child>) -> Self
where Self: Sized { ... }
}Expand description
A variation on ParentElement which only supports children of a particular type.
Required Associated Types§
Required Methods§
Sourcefn extend(&mut self, elements: impl IntoIterator<Item = Self::Child>)
fn extend(&mut self, elements: impl IntoIterator<Item = Self::Child>)
Extend this element’s children with the given child elements.
Provided Methods§
Sourcefn child(self, child: Self::Child) -> Selfwhere
Self: Sized,
fn child(self, child: Self::Child) -> Selfwhere
Self: Sized,
Add a single child element to this element.
Sourcefn children(self, children: impl IntoIterator<Item = Self::Child>) -> Selfwhere
Self: Sized,
fn children(self, children: impl IntoIterator<Item = Self::Child>) -> Selfwhere
Self: Sized,
Add multiple child elements to this element.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".