Skip to main content

ParsedDocument

Struct ParsedDocument 

Source
pub struct ParsedDocument<L = String, V = MemValue> {
    pub patterns: Vec<Pattern<L, V>>,
    pub graphs: Vec<MemGraph>,
}
Expand description

Result of parsing a document with patterns, graphs, and compose directives.

Generic over label and value types with defaults for backward compatibility. Use ParsedDocument (no params) for the default Pattern<String, MemValue>.

Fields§

§patterns: Vec<Pattern<L, V>>

All compiled patterns (both directly declared and composed).

§graphs: Vec<MemGraph>

Parsed graphs (always MemGraph — graphs are test-only).

Trait Implementations§

Source§

impl<L: Debug, V: Debug> Debug for ParsedDocument<L, V>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<L, V> Freeze for ParsedDocument<L, V>

§

impl<L, V> RefUnwindSafe for ParsedDocument<L, V>

§

impl<L, V> Send for ParsedDocument<L, V>
where L: Send, V: Send,

§

impl<L, V> Sync for ParsedDocument<L, V>
where L: Sync, V: Sync,

§

impl<L, V> Unpin for ParsedDocument<L, V>
where L: Unpin, V: Unpin,

§

impl<L, V> UnsafeUnpin for ParsedDocument<L, V>

§

impl<L, V> UnwindSafe for ParsedDocument<L, V>
where L: UnwindSafe, V: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.