pub struct TodoFile { /* private fields */ }Expand description
Represents a rebase file.
Implementations
sourceimpl TodoFile
impl TodoFile
sourcepub fn write_file(&self) -> Result<()>
pub fn write_file(&self) -> Result<()>
sourcepub fn set_selected_line_index(&mut self, selected_line_index: usize)
pub fn set_selected_line_index(&mut self, selected_line_index: usize)
Set the selected line index.
sourcepub fn swap_range_up(&mut self, start_index: usize, end_index: usize) -> bool
pub fn swap_range_up(&mut self, start_index: usize, end_index: usize) -> bool
Swap a range of lines up.
sourcepub fn swap_range_down(&mut self, start_index: usize, end_index: usize) -> bool
pub fn swap_range_down(&mut self, start_index: usize, end_index: usize) -> bool
Swap a range of lines down.
sourcepub fn remove_lines(&mut self, start_index: usize, end_index: usize)
pub fn remove_lines(&mut self, start_index: usize, end_index: usize)
Remove a range of lines.
sourcepub fn update_range(
&mut self,
start_index: usize,
end_index: usize,
edit_context: &EditContext
)
pub fn update_range(
&mut self,
start_index: usize,
end_index: usize,
edit_context: &EditContext
)
Update a range of lines.
sourcepub fn get_selected_line(&self) -> Option<&Line>
pub fn get_selected_line(&self) -> Option<&Line>
Get the selected line.
sourcepub fn get_max_selected_line_index(&self) -> usize
pub fn get_max_selected_line_index(&self) -> usize
Get the index of the last line that can be selected.
sourcepub const fn get_selected_line_index(&self) -> usize
pub const fn get_selected_line_index(&self) -> usize
Get the selected line index
sourcepub fn get_filepath(&self) -> &str
pub fn get_filepath(&self) -> &str
Get the file path to the rebase file.
sourcepub fn get_lines_owned(&self) -> Vec<Line>
pub fn get_lines_owned(&self) -> Vec<Line>
Get an owned copy of the lines.
sourcepub fn lines_iter(&self) -> Iter<'_, Line>
pub fn lines_iter(&self) -> Iter<'_, Line>
Get an iterator over the lines.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TodoFile
impl Send for TodoFile
impl Sync for TodoFile
impl Unpin for TodoFile
impl UnwindSafe for TodoFile
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more