pub struct ToggleComment;Trait Implementations§
Source§impl Action for ToggleComment
impl Action for ToggleComment
Source§fn apply(&mut self, editor: &mut Editor)
fn apply(&mut self, editor: &mut Editor)
The ToggleComment action toggles line comments at the start of the selected lines.
If all lines in the selection already start with the language’s comment string (e.g., “//” for Rust), this action removes the comment string from each affected line. Otherwise, it prepends the comment string to the beginning of each line in the selection.
If there is no selection, the action is applied to the line under the cursor.
Auto Trait Implementations§
impl Freeze for ToggleComment
impl RefUnwindSafe for ToggleComment
impl Send for ToggleComment
impl Sync for ToggleComment
impl Unpin for ToggleComment
impl UnsafeUnpin for ToggleComment
impl UnwindSafe for ToggleComment
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more