Enum egui_tiles::Tile
source · pub enum Tile<Pane> {
Pane(Pane),
Container(Container),
}
Expand description
A tile in the tree. Either a pane (leaf) or a Container
of more tiles.
Variants§
Pane(Pane)
A leaf. This is where the user puts their UI, using the crate::Behavior
trait.
Container(Container)
A container of more tiles, e.g. a horizontal layout or a tab layout.
Implementations§
source§impl<Pane> Tile<Pane>
impl<Pane> Tile<Pane>
sourcepub fn kind(&self) -> Option<ContainerKind>
pub fn kind(&self) -> Option<ContainerKind>
Returns None
if this is a Self::Pane
.
pub fn is_pane(&self) -> bool
pub fn is_container(&self) -> bool
pub fn container_kind(&self) -> Option<ContainerKind>
Trait Implementations§
source§impl<'de, Pane> Deserialize<'de> for Tile<Pane>where
Pane: Deserialize<'de>,
impl<'de, Pane> Deserialize<'de> for Tile<Pane>where Pane: Deserialize<'de>,
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
source§impl<Pane: PartialEq> PartialEq<Tile<Pane>> for Tile<Pane>
impl<Pane: PartialEq> PartialEq<Tile<Pane>> for Tile<Pane>
impl<Pane> StructuralPartialEq for Tile<Pane>
Auto Trait Implementations§
impl<Pane> RefUnwindSafe for Tile<Pane>where Pane: RefUnwindSafe,
impl<Pane> Send for Tile<Pane>where Pane: Send,
impl<Pane> Sync for Tile<Pane>where Pane: Sync,
impl<Pane> Unpin for Tile<Pane>where Pane: Unpin,
impl<Pane> UnwindSafe for Tile<Pane>where Pane: UnwindSafe,
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