pub struct PlainTermArrayElementBuilder { /* private fields */ }
Expand description
Provides a convenient API for building arrays (element-by-element) of RDF terms with the PlainTermEncoding. The documentation of the encoding provides additional information.
Implementations§
Source§impl PlainTermArrayElementBuilder
impl PlainTermArrayElementBuilder
Sourcepub fn new(capacity: usize) -> Self
pub fn new(capacity: usize) -> Self
Create a PlainTermArrayElementBuilder with the given capacity
.
Sourcepub fn append_null(&mut self)
pub fn append_null(&mut self)
Appends a null value to the array.
Sourcepub fn append_named_node(&mut self, named_node: NamedNodeRef<'_>)
pub fn append_named_node(&mut self, named_node: NamedNodeRef<'_>)
Appends a name node to the array.
Sourcepub fn append_blank_node(&mut self, blank_node: BlankNodeRef<'_>)
pub fn append_blank_node(&mut self, blank_node: BlankNodeRef<'_>)
Appends a blank node to the array.
Sourcepub fn append_literal(&mut self, literal: LiteralRef<'_>)
pub fn append_literal(&mut self, literal: LiteralRef<'_>)
Appends a literal to the array.
This encoding retains invalid lexical values for typed RDF literals.
Sourcepub fn append_term(&mut self, literal: TermRef<'_>)
pub fn append_term(&mut self, literal: TermRef<'_>)
Appends an arbitrary RDF term to the array.
This encoding retains invalid lexical values for typed RDF literals.
pub fn finish(self) -> PlainTermArray
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PlainTermArrayElementBuilder
impl !RefUnwindSafe for PlainTermArrayElementBuilder
impl Send for PlainTermArrayElementBuilder
impl Sync for PlainTermArrayElementBuilder
impl Unpin for PlainTermArrayElementBuilder
impl !UnwindSafe for PlainTermArrayElementBuilder
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> 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