pub struct JsonLdParser { /* private fields */ }Expand description
JSON-LD parser implementation
This wraps the full JSON-LD parser from the jsonld module and provides a simplified interface for the format abstraction layer.
Implementations§
Source§impl JsonLdParser
impl JsonLdParser
Sourcepub fn with_profile(self, profile: JsonLdProfileSet) -> Self
pub fn with_profile(self, profile: JsonLdProfileSet) -> Self
Set the JSON-LD processing profile
Sourcepub fn with_base_iri(
self,
base_iri: impl Into<String>,
) -> Result<Self, RdfParseError>
pub fn with_base_iri( self, base_iri: impl Into<String>, ) -> Result<Self, RdfParseError>
Set base IRI for resolving relative IRIs
Sourcepub fn parse_reader<R: Read>(&self, reader: R) -> ParseResult<Vec<Quad>>
pub fn parse_reader<R: Read>(&self, reader: R) -> ParseResult<Vec<Quad>>
Parse JSON-LD from a reader
Sourcepub fn parse_slice(&self, slice: &[u8]) -> ParseResult<Vec<Quad>>
pub fn parse_slice(&self, slice: &[u8]) -> ParseResult<Vec<Quad>>
Parse JSON-LD from a byte slice
Sourcepub fn profile(&self) -> &JsonLdProfileSet
pub fn profile(&self) -> &JsonLdProfileSet
Get the processing profile
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JsonLdParser
impl RefUnwindSafe for JsonLdParser
impl Send for JsonLdParser
impl Sync for JsonLdParser
impl Unpin for JsonLdParser
impl UnsafeUnpin for JsonLdParser
impl UnwindSafe for JsonLdParser
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