Trait FTMLExtractor

Source
pub trait FTMLExtractor {
    type Attr<'a>: Attributes;

    const RDF: bool;
Show 56 methods // Required methods fn styles(&mut self) -> &mut DocumentStyles; fn add_triples<const N: usize>(&mut self, triples: [Triple; N]); fn get_narrative_uri(&self) -> NarrativeURI; fn get_content_uri(&self) -> Option<&ModuleURI>; fn with_problem<R>( &mut self, then: impl FnOnce(&mut ProblemState) -> R, ) -> Option<R>; fn resolve_variable_name(&self, name: Name) -> Var; fn add_error(&mut self, err: FTMLError); fn add_module(&mut self, module: OpenModule<Unchecked>); fn new_id(&mut self, prefix: Cow<'static, str>) -> Box<str>; fn in_notation(&self) -> bool; fn in_term(&self) -> bool; fn set_in_term(&mut self, b: bool); fn add_document_element(&mut self, elem: DocumentElement<Unchecked>); fn add_content_element( &mut self, elem: OpenDeclaration<Unchecked>, ) -> Result<(), OpenDeclaration<Unchecked>>; fn open_content(&mut self, uri: ModuleURI); fn open_narrative(&mut self, uri: Option<NarrativeURI>); fn open_complex_term(&mut self); fn close_content( &mut self, ) -> Option<(ModuleURI, Vec<OpenDeclaration<Unchecked>>)>; fn close_narrative( &mut self, ) -> Option<(NarrativeURI, Vec<DocumentElement<Unchecked>>)>; fn close_complex_term(&mut self) -> Option<Term>; fn open_section(&mut self, uri: DocumentElementURI); fn close_section( &mut self, ) -> Option<(DocumentElementURI, Option<DocumentRange>, Vec<DocumentElement<Unchecked>>)>; fn open_slide(&mut self); fn close_slide(&mut self) -> Option<Vec<DocumentElement<Unchecked>>>; fn open_paragraph( &mut self, uri: DocumentElementURI, fors: VecSet<SymbolURI>, ); fn close_paragraph(&mut self) -> Option<ParagraphState>; fn open_problem(&mut self, uri: DocumentElementURI); fn close_problem(&mut self) -> Option<ProblemState>; fn open_gnote(&mut self); fn close_gnote(&mut self) -> Option<GnoteState>; fn open_choice_block(&mut self, multiple: bool, styles: Box<[Box<str>]>); fn close_choice_block(&mut self) -> Option<ChoiceBlockState>; fn open_fillinsol(&mut self, width: Option<f32>); fn close_fillinsol(&mut self) -> Option<FillinsolState>; fn push_fillinsol_case(&mut self, case: FillInSolOption); fn push_answer_class(&mut self, id: Box<str>, kind: AnswerKind); fn push_problem_choice(&mut self, correct: bool); fn set_document_title(&mut self, title: Box<str>); fn add_title(&mut self, title: DocumentRange) -> Result<(), DocumentRange>; fn open_decl(&mut self); fn close_decl(&mut self) -> Option<(Option<Term>, Option<Term>)>; fn open_notation(&mut self); fn close_notation(&mut self) -> Option<NotationState>; fn open_args(&mut self); fn close_args(&mut self) -> (Vec<Arg>, Option<Term>); fn add_precondition(&mut self, uri: SymbolURI, dim: CognitiveDimension); fn add_objective(&mut self, uri: SymbolURI, dim: CognitiveDimension); fn add_arg( &mut self, pos: (u8, Option<u8>), tm: Term, mode: ArgMode, ) -> Result<(), ()>; fn add_definiendum(&mut self, uri: SymbolURI); fn add_resource<T: Resourcable>(&mut self, t: &T) -> LazyDocRef<T>; fn add_notation(&mut self, spec: NotationSpec) -> Result<(), NotationSpec>; fn add_op_notation(&mut self, op: OpNotation) -> Result<(), OpNotation>; fn add_type(&mut self, tm: Term) -> Result<(), Term>; fn add_term( &mut self, symbol: Option<SymbolURI>, tm: Term, ) -> Result<(), Term>; // Provided methods fn get_document_iri(&self) -> NamedNode { ... } fn get_content_iri(&self) -> Option<NamedNode> { ... }
}

Required Associated Constantsยง

Source

const RDF: bool

Available on crate feature rdf only.

Required Associated Typesยง

Required Methodsยง

Source

fn styles(&mut self) -> &mut DocumentStyles

Source

fn add_triples<const N: usize>(&mut self, triples: [Triple; N])

Available on crate feature rdf only.
Source

fn get_narrative_uri(&self) -> NarrativeURI

Source

fn get_content_uri(&self) -> Option<&ModuleURI>

Source

fn with_problem<R>( &mut self, then: impl FnOnce(&mut ProblemState) -> R, ) -> Option<R>

Source

fn resolve_variable_name(&self, name: Name) -> Var

Source

fn add_error(&mut self, err: FTMLError)

Source

fn add_module(&mut self, module: OpenModule<Unchecked>)

Source

fn new_id(&mut self, prefix: Cow<'static, str>) -> Box<str>

Source

fn in_notation(&self) -> bool

Source

fn in_term(&self) -> bool

Source

fn set_in_term(&mut self, b: bool)

Source

fn add_document_element(&mut self, elem: DocumentElement<Unchecked>)

Source

fn add_content_element( &mut self, elem: OpenDeclaration<Unchecked>, ) -> Result<(), OpenDeclaration<Unchecked>>

ยงErrors
Source

fn open_content(&mut self, uri: ModuleURI)

Source

fn open_narrative(&mut self, uri: Option<NarrativeURI>)

Source

fn open_complex_term(&mut self)

Source

fn close_content( &mut self, ) -> Option<(ModuleURI, Vec<OpenDeclaration<Unchecked>>)>

Source

fn close_narrative( &mut self, ) -> Option<(NarrativeURI, Vec<DocumentElement<Unchecked>>)>

Source

fn close_complex_term(&mut self) -> Option<Term>

Source

fn open_section(&mut self, uri: DocumentElementURI)

Source

fn close_section( &mut self, ) -> Option<(DocumentElementURI, Option<DocumentRange>, Vec<DocumentElement<Unchecked>>)>

Source

fn open_slide(&mut self)

Source

fn close_slide(&mut self) -> Option<Vec<DocumentElement<Unchecked>>>

Source

fn open_paragraph(&mut self, uri: DocumentElementURI, fors: VecSet<SymbolURI>)

Source

fn close_paragraph(&mut self) -> Option<ParagraphState>

Source

fn open_problem(&mut self, uri: DocumentElementURI)

Source

fn close_problem(&mut self) -> Option<ProblemState>

Source

fn open_gnote(&mut self)

Source

fn close_gnote(&mut self) -> Option<GnoteState>

Source

fn open_choice_block(&mut self, multiple: bool, styles: Box<[Box<str>]>)

Source

fn close_choice_block(&mut self) -> Option<ChoiceBlockState>

Source

fn open_fillinsol(&mut self, width: Option<f32>)

Source

fn close_fillinsol(&mut self) -> Option<FillinsolState>

Source

fn push_fillinsol_case(&mut self, case: FillInSolOption)

Source

fn push_answer_class(&mut self, id: Box<str>, kind: AnswerKind)

Source

fn push_problem_choice(&mut self, correct: bool)

Source

fn set_document_title(&mut self, title: Box<str>)

Source

fn add_title(&mut self, title: DocumentRange) -> Result<(), DocumentRange>

ยงErrors
Source

fn open_decl(&mut self)

Source

fn close_decl(&mut self) -> Option<(Option<Term>, Option<Term>)>

Source

fn open_notation(&mut self)

Source

fn close_notation(&mut self) -> Option<NotationState>

Source

fn open_args(&mut self)

Source

fn close_args(&mut self) -> (Vec<Arg>, Option<Term>)

Source

fn add_precondition(&mut self, uri: SymbolURI, dim: CognitiveDimension)

Source

fn add_objective(&mut self, uri: SymbolURI, dim: CognitiveDimension)

Source

fn add_arg( &mut self, pos: (u8, Option<u8>), tm: Term, mode: ArgMode, ) -> Result<(), ()>

ยงErrors
Source

fn add_definiendum(&mut self, uri: SymbolURI)

Source

fn add_resource<T: Resourcable>(&mut self, t: &T) -> LazyDocRef<T>

Source

fn add_notation(&mut self, spec: NotationSpec) -> Result<(), NotationSpec>

ยงErrors
Source

fn add_op_notation(&mut self, op: OpNotation) -> Result<(), OpNotation>

ยงErrors
Source

fn add_type(&mut self, tm: Term) -> Result<(), Term>

ยงErrors
Source

fn add_term(&mut self, symbol: Option<SymbolURI>, tm: Term) -> Result<(), Term>

ยงErrors

Provided Methodsยง

Source

fn get_document_iri(&self) -> NamedNode

Available on crate feature rdf only.
Source

fn get_content_iri(&self) -> Option<NamedNode>

Available on crate feature rdf only.

Dyn Compatibilityยง

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementorsยง

Sourceยง

impl<E: StatefulExtractor> FTMLExtractor for E

Available on crate feature full only.
Sourceยง

const RDF: bool = <Self as StatefulExtractor>::RDF

Sourceยง

type Attr<'a> = <E as StatefulExtractor>::Attr<'a>