pub struct Sidebar { /* private fields */ }Expand description
The immutable commit tree; native filenames stay in its owning file list.
Implementations§
Source§impl Sidebar
impl Sidebar
Sourcepub fn build(files: &[ChangedFile]) -> Sidebar
pub fn build(files: &[ChangedFile]) -> Sidebar
Flat file list → sorted tree rows: a directory row appears the first time its component prefix shows up. Sorting and grouping walk native path components, so distinct non-UTF-8 paths never collapse into one lossy label.
Sourcepub fn measured_width(files: &[ChangedFile]) -> usize
pub fn measured_width(files: &[ChangedFile]) -> usize
Used only while preparing the immutable tree, never during painting.
Sourcepub fn outer_width(&self) -> usize
pub fn outer_width(&self) -> usize
Interior + the dividing rule — the exact cell count the pane’s
left_inset (and through it, the caret geometry) reserves.
Sourcepub fn rows(&self) -> &[SidebarRow]
pub fn rows(&self) -> &[SidebarRow]
The tree rows in paint order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sidebar
impl RefUnwindSafe for Sidebar
impl Send for Sidebar
impl Sync for Sidebar
impl Unpin for Sidebar
impl UnsafeUnpin for Sidebar
impl UnwindSafe for Sidebar
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