pub struct Line { /* private fields */ }
Expand description
Represents a line in the rebase file.
Implementations§
source§impl Line
impl Line
sourcepub fn new_update_ref(ref_name: &str) -> Self
pub fn new_update_ref(ref_name: &str) -> Self
Create a new update-ref line.
sourcepub fn new(input_line: &str) -> Result<Self, ParseError>
pub fn new(input_line: &str) -> Result<Self, ParseError>
sourcepub fn set_action(&mut self, action: Action)
pub fn set_action(&mut self, action: Action)
Set the action of the line.
sourcepub fn edit_content(&mut self, content: &str)
pub fn edit_content(&mut self, content: &str)
Edit the content of the line, if it is editable.
sourcepub fn toggle_option(&mut self, option: &str)
pub fn toggle_option(&mut self, option: &str)
Set the option on the line, toggling if the existing option matches.
sourcepub const fn get_action(&self) -> &Action
pub const fn get_action(&self) -> &Action
Get the action of the line.
sourcepub fn get_content(&self) -> &str
pub fn get_content(&self) -> &str
Get the content of the line.
sourcepub fn has_reference(&self) -> bool
pub fn has_reference(&self) -> bool
Does this line contain a commit reference.
sourcepub const fn is_editable(&self) -> bool
pub const fn is_editable(&self) -> bool
Can this line be edited.
Trait Implementations§
source§impl PartialEq<Line> for Line
impl PartialEq<Line> for Line
impl Eq for Line
impl StructuralEq for Line
impl StructuralPartialEq for Line
Auto Trait Implementations§
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
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