pub struct MarkdownCommentDraft { /* private fields */ }Expand description
An editable UTF-8-safe Markdown comment draft.
Implementations§
Source§impl MarkdownCommentDraft
impl MarkdownCommentDraft
pub const fn target(&self) -> MarkdownTargetId
pub const fn target_id(&self) -> MarkdownTargetId
pub const fn anchor(&self) -> &MarkdownAnchor
pub const fn context(&self) -> &MarkdownCommentContext
pub fn body(&self) -> &str
pub const fn cursor(&self) -> usize
pub fn body_before_cursor(&self) -> &str
pub const fn editing(&self) -> Option<u64>
pub fn set_body(&mut self, body: impl Into<String>)
pub fn insert(&mut self, text: &str)
pub fn delete_before_cursor(&mut self)
pub fn delete_at_cursor(&mut self)
pub fn move_cursor_left(&mut self)
pub fn move_cursor_right(&mut self)
pub const fn move_cursor_to_start(&mut self)
pub fn move_cursor_to_end(&mut self)
Trait Implementations§
Source§impl Clone for MarkdownCommentDraft
impl Clone for MarkdownCommentDraft
Source§fn clone(&self) -> MarkdownCommentDraft
fn clone(&self) -> MarkdownCommentDraft
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MarkdownCommentDraft
impl Debug for MarkdownCommentDraft
impl Eq for MarkdownCommentDraft
Source§impl PartialEq for MarkdownCommentDraft
impl PartialEq for MarkdownCommentDraft
impl StructuralPartialEq for MarkdownCommentDraft
Auto Trait Implementations§
impl Freeze for MarkdownCommentDraft
impl RefUnwindSafe for MarkdownCommentDraft
impl Send for MarkdownCommentDraft
impl Sync for MarkdownCommentDraft
impl Unpin for MarkdownCommentDraft
impl UnsafeUnpin for MarkdownCommentDraft
impl UnwindSafe for MarkdownCommentDraft
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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