pub struct ContentMatch {
pub next: Vec<MatchEdge>,
pub wrap_cache: Vec<Option<NodeType>>,
pub valid_end: bool,
}
Fields§
§next: Vec<MatchEdge>
§wrap_cache: Vec<Option<NodeType>>
§valid_end: bool
Implementations§
Source§impl ContentMatch
impl ContentMatch
pub fn parse(str: String, nodes: &HashMap<String, NodeType>) -> ContentMatch
pub fn empty() -> Self
pub fn match_type(&self, node_type: &NodeType) -> Option<&ContentMatch>
pub fn match_fragment( &self, frag: &[Node], schema: &Schema, ) -> Option<&ContentMatch>
pub fn default_type(&self) -> Option<&NodeType>
pub fn compatible(&self, other: &ContentMatch) -> bool
pub fn edge_count(&self) -> usize
pub fn edge(&self, n: usize) -> Result<&MatchEdge, String>
Trait Implementations§
Source§impl Clone for ContentMatch
impl Clone for ContentMatch
Source§fn clone(&self) -> ContentMatch
fn clone(&self) -> ContentMatch
Returns a copy of the value. Read more
1.0.0 · 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 ContentMatch
impl Debug for ContentMatch
Source§impl Default for ContentMatch
impl Default for ContentMatch
Source§fn default() -> ContentMatch
fn default() -> ContentMatch
Returns the “default value” for a type. Read more
Source§impl Display for ContentMatch
impl Display for ContentMatch
Source§impl Ord for ContentMatch
impl Ord for ContentMatch
Source§impl PartialEq for ContentMatch
impl PartialEq for ContentMatch
Source§impl PartialOrd for ContentMatch
impl PartialOrd for ContentMatch
impl Eq for ContentMatch
impl StructuralPartialEq for ContentMatch
Auto Trait Implementations§
impl Freeze for ContentMatch
impl RefUnwindSafe for ContentMatch
impl Send for ContentMatch
impl Sync for ContentMatch
impl Unpin for ContentMatch
impl UnwindSafe for ContentMatch
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