Adds a utility function to convert Triple to Quad

pull/10/head
Tpt 6 years ago
parent 01de63d875
commit 106d05431f
  1. 9
      src/model/triple.rs

@ -161,6 +161,15 @@ impl Triple {
object: object.into(),
}
}
pub fn in_graph(self, graph_name: Option<NamedOrBlankNode>) -> Quad {
Quad {
subject: self.subject,
predicate: self.predicate,
object: self.object,
graph_name,
}
}
}
impl fmt::Display for Triple {

Loading…
Cancel
Save