pub struct PanelSequence { /* private fields */ }Expand description
Flat ordered list of panel IDs, separate from tree topology.
Tracks the logical order of panels for focus navigation and strategy-based mutations (add, remove, move).
Implementations§
Source§impl PanelSequence
impl PanelSequence
Sourcepub fn remove(&mut self, pid: PanelId) -> Option<usize>
pub fn remove(&mut self, pid: PanelId) -> Option<usize>
Remove a panel by id. Returns its former index, or None if absent.
Sourcepub fn move_to(&mut self, pid: PanelId, new_index: usize) -> Option<usize>
pub fn move_to(&mut self, pid: PanelId, new_index: usize) -> Option<usize>
Move a panel to a new index. Returns None if the panel is absent
or the target index is out of bounds.
Sourcepub fn neighbor_after_removal(&self, removed_index: usize) -> Option<PanelId>
pub fn neighbor_after_removal(&self, removed_index: usize) -> Option<PanelId>
After removing the panel at removed_index, return the best neighbor
to receive focus. Prefers the panel that was after the removed one;
falls back to the one before. Returns None if the sequence is empty
after removal.
Trait Implementations§
Source§impl Clone for PanelSequence
impl Clone for PanelSequence
Source§fn clone(&self) -> PanelSequence
fn clone(&self) -> PanelSequence
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 PanelSequence
impl Debug for PanelSequence
Source§impl Default for PanelSequence
impl Default for PanelSequence
Source§fn default() -> PanelSequence
fn default() -> PanelSequence
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PanelSequence
impl RefUnwindSafe for PanelSequence
impl Send for PanelSequence
impl Sync for PanelSequence
impl Unpin for PanelSequence
impl UnsafeUnpin for PanelSequence
impl UnwindSafe for PanelSequence
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