pub struct Children {
pub explicit_list: Option<Vec<String>>,
pub template: Option<ChildTemplate>,
}Expand description
Defines the children of a container component.
Must contain exactly one of explicit_list or template.
Fields§
§explicit_list: Option<Vec<String>>An ordered list of component IDs that are direct children.
template: Option<ChildTemplate>A template for rendering dynamic lists of children.
Implementations§
Source§impl Children
impl Children
Sourcepub fn from_explicit_list(ids: Vec<String>) -> Self
pub fn from_explicit_list(ids: Vec<String>) -> Self
Create children from an explicit list of component IDs.
Sourcepub fn from_template(template: ChildTemplate) -> Self
pub fn from_template(template: ChildTemplate) -> Self
Create children from a template.
Trait Implementations§
Source§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
impl StructuralPartialEq for Children
Auto Trait Implementations§
impl Freeze for Children
impl RefUnwindSafe for Children
impl Send for Children
impl Sync for Children
impl Unpin for Children
impl UnsafeUnpin 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