pub struct ContentExpr { /* private fields */ }Expand description
A compiled ProseMirror content expression (e.g. paragraph+).
Parse with ContentExpr::parse; (de)serializes as its source string.
Implementations§
Source§impl ContentExpr
impl ContentExpr
Sourcepub fn parse(s: &str) -> Result<Self, ParseExprError>
pub fn parse(s: &str) -> Result<Self, ParseExprError>
Parse and compile a content-expression string.
use tiptap_rusty_parser::ContentExpr;
assert!(ContentExpr::parse("paragraph+").is_ok());
assert!(ContentExpr::parse("(a |").is_err());Trait Implementations§
Source§impl Clone for ContentExpr
impl Clone for ContentExpr
Source§fn clone(&self) -> ContentExpr
fn clone(&self) -> ContentExpr
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 ContentExpr
impl Debug for ContentExpr
Source§impl<'de> Deserialize<'de> for ContentExpr
impl<'de> Deserialize<'de> for ContentExpr
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ContentExpr
impl PartialEq for ContentExpr
Auto Trait Implementations§
impl Freeze for ContentExpr
impl RefUnwindSafe for ContentExpr
impl Send for ContentExpr
impl Sync for ContentExpr
impl Unpin for ContentExpr
impl UnsafeUnpin for ContentExpr
impl UnwindSafe for ContentExpr
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