pub struct MarkdownMatch {
pub prefix_len: usize,
pub block_type: String,
pub props: Value,
}Expand description
Result of a successful markdown-shortcut match. The dispatch side
(React + WASM) turns this into setSelection(0..prefix_len) +
Backspace + SetBlockType(block_type, props).
Fields§
§prefix_len: usizeUTF-16 length of the matched prefix (the TS code passed
prefix.length straight through, so this preserves the
contract: selections on the React side use UTF-16 code units).
block_type: StringTarget block type ("heading", "list", …).
props: ValueJSON object the editor should attach as the block’s props.
Trait Implementations§
Source§impl Clone for MarkdownMatch
impl Clone for MarkdownMatch
Source§fn clone(&self) -> MarkdownMatch
fn clone(&self) -> MarkdownMatch
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 MarkdownMatch
impl Debug for MarkdownMatch
Source§impl<'de> Deserialize<'de> for MarkdownMatch
impl<'de> Deserialize<'de> for MarkdownMatch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MarkdownMatch
impl PartialEq for MarkdownMatch
Source§fn eq(&self, other: &MarkdownMatch) -> bool
fn eq(&self, other: &MarkdownMatch) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MarkdownMatch
impl Serialize for MarkdownMatch
impl Eq for MarkdownMatch
impl StructuralPartialEq for MarkdownMatch
Auto Trait Implementations§
impl Freeze for MarkdownMatch
impl RefUnwindSafe for MarkdownMatch
impl Send for MarkdownMatch
impl Sync for MarkdownMatch
impl Unpin for MarkdownMatch
impl UnsafeUnpin for MarkdownMatch
impl UnwindSafe for MarkdownMatch
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