pub struct Document<M> {
pub statements: Vec<(Statement<M>, M)>,
}
Expand description
A Turtle document.
Fields§
§statements: Vec<(Statement<M>, M)>
Implementations§
Source§impl<M: Clone> Document<M>
impl<M: Clone> Document<M>
pub fn build_meta_triples( &self, base_iri: Option<IriBuf>, generator: impl Generator<()>, ) -> Result<Vec<MetaTriple<M, ()>>, BuildError<M>>
pub fn build_meta_triples_with<V: RdfVocabulary + IriVocabularyMut + BlankIdVocabularyMut>( &self, base_iri: Option<V::Iri>, vocabulary: &mut V, generator: impl Generator<V>, ) -> Result<Vec<MetaTriple<M, V>>, BuildError<M>>
pub fn build_lexical_triples( &self, base_iri: Option<IriBuf>, generator: impl Generator<()>, ) -> Result<Vec<LexicalTriple>, BuildError<M>>
Trait Implementations§
Source§impl<M: Clone, V: RdfVocabulary + IriVocabularyMut + BlankIdVocabularyMut, G: Generator<V>> Build<M, V, G> for Document<M>
impl<M: Clone, V: RdfVocabulary + IriVocabularyMut + BlankIdVocabularyMut, G: Generator<V>> Build<M, V, G> for Document<M>
fn build( &self, context: &mut Context<'_, '_, M, V, G>, triples: &mut Vec<MetaTriple<M, V>>, ) -> Result<(), BuildError<M>>
Source§impl<M> Parse<M> for Document<M>
impl<M> Parse<M> for Document<M>
fn parse_from<L, F>( parser: &mut Parser<L, F>, (token, span): (Token, Span), ) -> Result<(Self, M), ParseError<L::Error, M>>
fn parse_empty<L>(meta: M) -> Result<(Self, M), ParseError<L::Error, M>>where
L: Tokens,
fn parse_with<L, F>( parser: &mut Parser<L, F>, ) -> Result<(Self, M), ParseError<L::Error, M>>
fn parse<C, F, E>( chars: C, metadata_builder: F, ) -> Result<(Self, M), ParseError<Error<E>, M>>
fn parse_infallible<C, F>( chars: C, metadata_builder: F, ) -> Result<(Self, M), ParseError<Error, M>>
fn parse_utf8<C, F, E>( chars: C, metadata_builder: F, ) -> Result<(Self, M), ParseError<Error<E>, M>>
fn parse_utf8_infallible<C, F>( chars: C, metadata_builder: F, ) -> Result<(Self, M), ParseError<Error, M>>
fn parse_utf16<C, F, E>( chars: C, metadata_builder: F, ) -> Result<(Self, M), ParseError<Error<E>, M>>
fn parse_utf16_infallible<C, F>( chars: C, metadata_builder: F, ) -> Result<(Self, M), ParseError<Error, M>>
fn parse_str<F>( string: &str, metadata_builder: F, ) -> Result<(Self, M), ParseError<Error, M>>
Auto Trait Implementations§
impl<M> Freeze for Document<M>
impl<M> RefUnwindSafe for Document<M>where
M: RefUnwindSafe,
impl<M> Send for Document<M>where
M: Send,
impl<M> Sync for Document<M>where
M: Sync,
impl<M> Unpin for Document<M>where
M: Unpin,
impl<M> UnwindSafe for Document<M>where
M: UnwindSafe,
Blanket Implementations§
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