Skip to main content

AutoPrefix

Trait AutoPrefix 

Source
pub trait AutoPrefix {
    // Required method
    fn add_comment(&mut self) -> bool;
}
Expand description

Trait to add the comment prefix of the previous line.

Required Methods§

Source

fn add_comment(&mut self) -> bool

Adds the comment prefix of the previous line

This function will assume that the current cursor position is where you want to add the prefix, with indentation already taken into account.

Returns true if the line was commented.

Implementations on Foreign Types§

Source§

impl AutoPrefix for Cursor<'_>

Source§

fn add_comment(&mut self) -> bool

Implementors§