pub enum LayoutNode {
Leaf {
pane_id: PaneId,
},
Split {
axis: SplitAxis,
ratio: u16,
first: Box<LayoutNode>,
second: Box<LayoutNode>,
},
}Variants§
Implementations§
Source§impl LayoutNode
impl LayoutNode
pub fn leaf(pane_id: PaneId) -> Self
pub fn split_leaf( &mut self, target: PaneId, axis: SplitAxis, new_pane: PaneId, ratio: u16, ) -> bool
pub fn remove_leaf(&mut self, target: PaneId) -> bool
pub fn contains(&self, target: PaneId) -> bool
pub fn leaves(&self) -> Vec<PaneId>
pub fn focus_neighbor( &self, target: PaneId, direction: Direction, ) -> Option<PaneId>
pub fn resize_leaf( &mut self, target: PaneId, direction: Direction, amount: i32, ) -> bool
pub fn set_ratio_at_path(&mut self, path: &[bool], ratio: u16) -> bool
Trait Implementations§
Source§impl Clone for LayoutNode
impl Clone for LayoutNode
Source§fn clone(&self) -> LayoutNode
fn clone(&self) -> LayoutNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutNode
impl Debug for LayoutNode
Source§impl<'de> Deserialize<'de> for LayoutNode
impl<'de> Deserialize<'de> for LayoutNode
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 PartialEq for LayoutNode
impl PartialEq for LayoutNode
Source§impl Serialize for LayoutNode
impl Serialize for LayoutNode
impl Eq for LayoutNode
impl StructuralPartialEq for LayoutNode
Auto Trait Implementations§
impl Freeze for LayoutNode
impl RefUnwindSafe for LayoutNode
impl Send for LayoutNode
impl Sync for LayoutNode
impl Unpin for LayoutNode
impl UnsafeUnpin for LayoutNode
impl UnwindSafe for LayoutNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.