struct Extractor<'a> {
errors: String,
css: Vec<CSS>,
refs: Vec<u8>,
triples: HSet<Triple>,
title: Option<Box<str>>,
backend: &'a AnyBackend,
state: ExtractorState,
}
Fieldsยง
ยงerrors: String
ยงcss: Vec<CSS>
ยงrefs: Vec<u8>
ยงtriples: HSet<Triple>
ยงtitle: Option<Box<str>>
ยงbackend: &'a AnyBackend
ยงstate: ExtractorState
Trait Implementationsยง
Sourceยงimpl StatefulExtractor for Extractor<'_>
impl StatefulExtractor for Extractor<'_>
const RDF: bool = true
type Attr<'a> = Attributes
fn add_resource<T: Resourcable>(&mut self, t: &T) -> LazyDocRef<T>
fn state(&self) -> &ExtractorState
fn state_mut(&mut self) -> &mut ExtractorState
fn set_document_title(&mut self, title: Box<str>)
fn add_triples<const N: usize>(&mut self, triples: [Triple; N])
fn add_error(&mut self, err: FTMLError)
Auto Trait Implementationsยง
impl<'a> Freeze for Extractor<'a>
impl<'a> !RefUnwindSafe for Extractor<'a>
impl<'a> Send for Extractor<'a>
impl<'a> Sync for Extractor<'a>
impl<'a> Unpin for Extractor<'a>
impl<'a> !UnwindSafe for Extractor<'a>
Blanket Implementationsยง
ยงimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
ยงtype ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
ยงfn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
ยงimpl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
ยงfn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
ยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
ยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.ยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.ยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
โs vtable from &Trait
โs.ยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
โs vtable from &mut Trait
โs.ยงimpl<T> DowncastSend for T
impl<T> DowncastSend for T
ยงimpl<T> DowncastSync for T
impl<T> DowncastSync for T
Sourceยงimpl<E> FTMLExtractor for Ewhere
E: StatefulExtractor,
impl<E> FTMLExtractor for Ewhere
E: StatefulExtractor,
Sourceยงfn add_content_element(
&mut self,
elem: OpenDeclaration<Unchecked>,
) -> Result<(), OpenDeclaration<Unchecked>>
fn add_content_element( &mut self, elem: OpenDeclaration<Unchecked>, ) -> Result<(), OpenDeclaration<Unchecked>>
ยงErrors
const RDF: bool = <Self as StatefulExtractor>::RDF
type Attr<'a> = <E as StatefulExtractor>::Attr<'a>
fn add_triples<const N: usize>(&mut self, triples: [Triple; N])
fn add_error(&mut self, err: FTMLError)
fn styles(&mut self) -> &mut DocumentStyles
fn set_document_title(&mut self, title: Box<str>)
fn add_resource<T>(&mut self, t: &T) -> LazyDocRef<T>where
T: Resourcable,
fn resolve_variable_name(&self, name: Name) -> Var
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 with_problem<R>( &mut self, then: impl FnOnce(&mut ProblemState) -> R, ) -> Option<R>
fn push_answer_class(&mut self, id: Box<str>, kind: AnswerKind)
fn push_problem_choice(&mut self, correct: bool)
fn push_fillinsol_case(&mut self, case: FillInSolOption)
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_gnote(&mut self)
fn close_gnote(&mut self) -> Option<GnoteState>
fn open_fillinsol(&mut self, _width: Option<f32>)
fn close_fillinsol(&mut self) -> Option<FillinsolState>
fn open_choice_block(&mut self, multiple: bool, styles: Box<[Box<str>]>)
fn close_choice_block(&mut self) -> Option<ChoiceBlockState>
fn open_problem(&mut self, uri: DocumentElementURI)
fn close_problem(&mut self) -> Option<ProblemState>
fn add_precondition(&mut self, uri: SymbolURI, dim: CognitiveDimension)
fn add_objective(&mut self, uri: SymbolURI, dim: CognitiveDimension)
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 get_narrative_uri(&self) -> NarrativeURI
fn add_definiendum(&mut self, uri: SymbolURI)
fn get_content_uri(&self) -> Option<&ModuleURI>
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>)
Sourceยงfn add_title(&mut self, ttl: DocumentRange) -> Result<(), DocumentRange>
fn add_title(&mut self, ttl: DocumentRange) -> Result<(), DocumentRange>
Errors Read more
Sourceยงfn add_notation(&mut self, _: NotationSpec) -> Result<(), NotationSpec>
fn add_notation(&mut self, _: NotationSpec) -> Result<(), NotationSpec>
Errors Read more
Sourceยงfn add_op_notation(&mut self, op: OpNotation) -> Result<(), OpNotation>
fn add_op_notation(&mut self, op: OpNotation) -> Result<(), OpNotation>
Errors Read more
Sourceยงfn add_arg(
&mut self,
_: (u8, Option<u8>),
tm: Term,
mode: ArgMode,
) -> Result<(), ()>
fn add_arg( &mut self, _: (u8, Option<u8>), tm: Term, mode: ArgMode, ) -> Result<(), ()>
Errors Read more
fn get_document_iri(&self) -> NamedNode
fn get_content_iri(&self) -> Option<NamedNode>
ยงimpl<T> Instrument for T
impl<T> Instrument for T
ยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
ยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more