pub trait ContainerParentDataMixin: ParentData {
type ChildType: Copy + PartialEq;
// Required methods
fn container_parent_data(&self) -> &ContainerParentData<Self::ChildType>;
fn container_parent_data_mut(
&mut self,
) -> &mut ContainerParentData<Self::ChildType>;
// Provided methods
fn previous_sibling(&self) -> Option<Self::ChildType> { ... }
fn set_previous_sibling(&mut self, value: Option<Self::ChildType>) { ... }
fn next_sibling(&self) -> Option<Self::ChildType> { ... }
fn set_next_sibling(&mut self, value: Option<Self::ChildType>) { ... }
fn detach(&mut self) { ... }
}Expand description
Parent data to support a doubly-linked list of children.
The children can be traversed using next_sibling or
previous_sibling, which can be called on the parent data of the
render objects obtained via crate::ContainerRenderObjectMixin::first_child or
crate::ContainerRenderObjectMixin::last_child.
Flutter’s ContainerParentDataMixin. The links live in a ContainerParentData field.
Required Associated Types§
Required Methods§
Sourcefn container_parent_data(&self) -> &ContainerParentData<Self::ChildType>
fn container_parent_data(&self) -> &ContainerParentData<Self::ChildType>
Mixin field access.
Sourcefn container_parent_data_mut(
&mut self,
) -> &mut ContainerParentData<Self::ChildType>
fn container_parent_data_mut( &mut self, ) -> &mut ContainerParentData<Self::ChildType>
Provided Methods§
Sourcefn previous_sibling(&self) -> Option<Self::ChildType>
fn previous_sibling(&self) -> Option<Self::ChildType>
The previous sibling in the parent’s child list.
Sourcefn set_previous_sibling(&mut self, value: Option<Self::ChildType>)
fn set_previous_sibling(&mut self, value: Option<Self::ChildType>)
Sets previous_sibling.
Sourcefn next_sibling(&self) -> Option<Self::ChildType>
fn next_sibling(&self) -> Option<Self::ChildType>
The next sibling in the parent’s child list.
Sourcefn set_next_sibling(&mut self, value: Option<Self::ChildType>)
fn set_next_sibling(&mut self, value: Option<Self::ChildType>)
Sets next_sibling.
Sourcefn detach(&mut self)
fn detach(&mut self)
Clear the sibling pointers.
The body of Flutter’s detach override; call it from ParentData::detach.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".