[][src]Trait dubp_documents::TextDocumentParser

pub trait TextDocumentParser<R: RuleType> {
    type DocumentType;
    fn parse(doc: &str) -> Result<Self::DocumentType, TextDocumentParseError>;
fn from_pest_pair(
        pairs: Pair<R>
    ) -> Result<Self::DocumentType, TextDocumentParseError>;
fn from_versioned_pest_pair(
        version: u16,
        pairs: Pair<R>
    ) -> Result<Self::DocumentType, TextDocumentParseError>; }

Associated Types

type DocumentType

Type of document generated by the parser

Loading content...

Required methods

fn parse(doc: &str) -> Result<Self::DocumentType, TextDocumentParseError>

Parse text document from raw format

fn from_pest_pair(
    pairs: Pair<R>
) -> Result<Self::DocumentType, TextDocumentParseError>

Parse text document from pest pairs

fn from_versioned_pest_pair(
    version: u16,
    pairs: Pair<R>
) -> Result<Self::DocumentType, TextDocumentParseError>

Parse text document from versioned pest pairs

Loading content...

Implementors

impl TextDocumentParser<Rule> for UserDocumentDUBP[src]

impl TextDocumentParser<Rule> for CertificationDocumentParser[src]

impl TextDocumentParser<Rule> for IdentityDocumentParser[src]

impl TextDocumentParser<Rule> for MembershipDocumentParser[src]

impl TextDocumentParser<Rule> for RevocationDocumentParser[src]

impl TextDocumentParser<Rule> for TransactionDocumentParser[src]

Loading content...