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
impl<Pane> StructuralPartialEq for Tile<Pane>
Auto Trait Implementations§
impl<Pane> Freeze for Tile<Pane>where
Pane: Freeze,
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