pub struct TurtleParser { /* private fields */ }Expand description
High-level Turtle parser combining lexer and grammar recognizer
Implementations§
Source§impl TurtleParser
impl TurtleParser
pub fn new() -> Self
Sourcepub fn parse_str(&mut self, _input: &str) -> ParseResult<Vec<Triple>>
pub fn parse_str(&mut self, _input: &str) -> ParseResult<Vec<Triple>>
Parse Turtle from a string into triples
Sourcepub fn parse_reader<R: Read>(&mut self, _reader: R) -> ParseResult<Vec<Triple>>
pub fn parse_reader<R: Read>(&mut self, _reader: R) -> ParseResult<Vec<Triple>>
Parse Turtle from a reader into triples
Sourcepub fn set_base_iri(&mut self, base_iri: String)
pub fn set_base_iri(&mut self, base_iri: String)
Set base IRI for relative IRI resolution
Sourcepub fn add_prefix(&mut self, prefix: String, iri: String)
pub fn add_prefix(&mut self, prefix: String, iri: String)
Add a prefix declaration
Sourcepub fn context(&self) -> &TurtleContext
pub fn context(&self) -> &TurtleContext
Get the current context (for inspection)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TurtleParser
impl RefUnwindSafe for TurtleParser
impl Send for TurtleParser
impl Sync for TurtleParser
impl Unpin for TurtleParser
impl UnsafeUnpin for TurtleParser
impl UnwindSafe for TurtleParser
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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