pub struct TaskToggleEvent { /* private fields */ }Expand description
A click on the checkbox of a Markdown task list item, passed to the
TextView::on_task_toggle handler.
The ranges are byte ranges in the view’s source text.
Implementations§
Source§impl TaskToggleEvent
impl TaskToggleEvent
Sourcepub fn checked(&self) -> bool
pub fn checked(&self) -> bool
The checked state the item should now have: the opposite of the state its checkbox shows.
Sourcepub fn item_range(&self) -> Range<usize> ⓘ
pub fn item_range(&self) -> Range<usize> ⓘ
The list item’s source span, starting at its list marker (-, *,
1.) and covering its content, nested lists included.
Sourcepub fn marker_range(&self) -> Range<usize> ⓘ
pub fn marker_range(&self) -> Range<usize> ⓘ
The item’s task marker: the [ ] or [x] itself, brackets included.
Trait Implementations§
Source§impl Clone for TaskToggleEvent
impl Clone for TaskToggleEvent
Auto Trait Implementations§
impl Forget for TaskToggleEvent
impl Freeze for TaskToggleEvent
impl RefUnwindSafe for TaskToggleEvent
impl Send for TaskToggleEvent
impl Sync for TaskToggleEvent
impl Unpin for TaskToggleEvent
impl UnsafeUnpin for TaskToggleEvent
impl UnwindSafe for TaskToggleEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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