Expand description
gRDF term reference.
Implementations§
source§impl<'a> TermRef<'a>
impl<'a> TermRef<'a>
sourcepub fn into_owned(self) -> Term
pub fn into_owned(self) -> Term
Examples found in repository?
src/lib.rs (line 756)
752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796
pub fn into_owned(self) -> Quad {
Quad(
self.0.into_owned(),
self.1.to_owned(),
self.2.into_owned(),
self.3.map(GraphLabelRef::into_owned),
)
}
}
impl<'a> From<&'a Quad> for QuadRef<'a> {
#[inline(always)]
fn from(q: &'a Quad) -> Self {
q.as_quad_ref()
}
}
impl<'a> From<Quad<&'a Subject, &'a IriBuf, &'a Object, &'a GraphLabel>> for QuadRef<'a> {
#[inline(always)]
fn from(Quad(s, p, o, g): Quad<&'a Subject, &'a IriBuf, &'a Object, &'a GraphLabel>) -> Self {
Quad(
s.as_subject_ref(),
p.as_iri(),
o.as_object_ref(),
g.map(GraphLabel::as_graph_label_ref),
)
}
}
/// gRDF quad.
pub type GrdfQuad = Quad<Term, Term, Term, Term>;
/// gRDF quad reference.
pub type GrdfQuadRef<'a> = Quad<TermRef<'a>, TermRef<'a>, TermRef<'a>, TermRef<'a>>;
impl<'a> GrdfQuadRef<'a> {
#[inline(always)]
pub fn into_owned(self) -> GrdfQuad {
Quad(
self.0.into_owned(),
self.1.into_owned(),
self.2.into_owned(),
self.3.map(Term::into_owned),
)
}