pub trait HasChildren<C> {
// Required methods
fn with_children(children: Vec<C>) -> Self;
fn children(&self) -> &Vec<C>;
fn children_mut(&mut self) -> &mut Vec<C>;
// Provided methods
fn append_child<R: Into<C>>(&mut self, child: R) { ... }
fn append_children<R: Into<C> + Clone>(&mut self, more: &[R]) { ... }
}
Required Methods§
fn with_children(children: Vec<C>) -> Self
fn children(&self) -> &Vec<C>
fn children_mut(&mut self) -> &mut Vec<C>
Provided Methods§
fn append_child<R: Into<C>>(&mut self, child: R)
fn append_children<R: Into<C> + Clone>(&mut self, more: &[R])
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.