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ยง
Required Associated Typesยง
type Attr<'a>: Attributes
Required Methodsยง
fn styles(&mut self) -> &mut DocumentStyles
fn add_triples<const N: usize>(&mut self, triples: [Triple; N])
Available on crate feature
rdf
only.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>)
Sourcefn add_content_element(
&mut self,
elem: OpenDeclaration<Unchecked>,
) -> Result<(), OpenDeclaration<Unchecked>>
fn add_content_element( &mut self, elem: OpenDeclaration<Unchecked>, ) -> Result<(), OpenDeclaration<Unchecked>>
ยงErrors
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 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)
Sourcefn add_arg(
&mut self,
pos: (u8, Option<u8>),
tm: Term,
mode: ArgMode,
) -> Result<(), ()>
fn add_arg( &mut self, pos: (u8, Option<u8>), tm: Term, mode: ArgMode, ) -> Result<(), ()>
ยงErrors
fn add_definiendum(&mut self, uri: SymbolURI)
fn add_resource<T: Resourcable>(&mut self, t: &T) -> LazyDocRef<T>
Sourcefn add_notation(&mut self, spec: NotationSpec) -> Result<(), NotationSpec>
fn add_notation(&mut self, spec: NotationSpec) -> Result<(), NotationSpec>
ยงErrors
Sourcefn add_op_notation(&mut self, op: OpNotation) -> Result<(), OpNotation>
fn add_op_notation(&mut self, op: OpNotation) -> Result<(), OpNotation>
ยงErrors
Provided Methodsยง
fn get_document_iri(&self) -> NamedNode
Available on crate feature
rdf
only.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.
impl<E: StatefulExtractor> FTMLExtractor for E
Available on crate feature
full
only.