Simplifies some rust doc links

pull/537/head
Tpt 1 year ago committed by Thomas Tanon
parent 03f7641355
commit 1c1531f640
  1. 4
      lib/oxrdf/src/dataset.rs
  2. 4
      lib/oxrdf/src/graph.rs
  3. 4
      lib/sparesults/src/lib.rs
  4. 14
      lib/src/io/read.rs
  5. 14
      lib/src/io/write.rs
  6. 2
      lib/src/sparql/service.rs

@ -1,4 +1,4 @@
//! [In-memory implementation](super::Dataset) of [RDF datasets](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset). //! [In-memory implementation](Dataset) of [RDF datasets](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset).
//! //!
//! Usage example: //! Usage example:
//! ``` //! ```
@ -24,7 +24,7 @@
//! # Result::<_,Box<dyn std::error::Error>>::Ok(()) //! # Result::<_,Box<dyn std::error::Error>>::Ok(())
//! ``` //! ```
//! //!
//! See also [`Graph`](super::Graph) if you only care about plain triples. //! See also [`Graph`] if you only care about plain triples.
use crate::interning::*; use crate::interning::*;
use crate::SubjectRef; use crate::SubjectRef;

@ -1,4 +1,4 @@
//! [In-memory implementation](super::Graph) of [RDF graphs](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-graph). //! [In-memory implementation](Graph) of [RDF graphs](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-graph).
//! //!
//! Usage example: //! Usage example:
//! ``` //! ```
@ -20,7 +20,7 @@
//! # Result::<_,Box<dyn std::error::Error>>::Ok(()) //! # Result::<_,Box<dyn std::error::Error>>::Ok(())
//! ``` //! ```
//! //!
//! See also [`Dataset`](super::Dataset) if you want to get support of multiple RDF graphs at the same time. //! See also [`Dataset`] if you want to get support of multiple RDF graphs at the same time.
use crate::dataset::*; use crate::dataset::*;
use crate::*; use crate::*;

@ -363,7 +363,7 @@ impl QueryResultsSerializer {
Self { format } Self { format }
} }
/// Write a boolean query result (from an `ASK` query) into the given [`Write`](std::io::Write) implementation. /// Write a boolean query result (from an `ASK` query) into the given [`Write`] implementation.
/// ///
/// Example in XML (the API is the same for JSON and TSV): /// Example in XML (the API is the same for JSON and TSV):
/// ``` /// ```
@ -384,7 +384,7 @@ impl QueryResultsSerializer {
} }
} }
/// Returns a `SolutionsWriter` allowing writing query solutions into the given [`Write`](std::io::Write) implementation. /// Returns a `SolutionsWriter` allowing writing query solutions into the given [`Write`] implementation.
/// ///
/// Example in XML (the API is the same for JSON and TSV): /// Example in XML (the API is the same for JSON and TSV):
/// ``` /// ```

@ -14,9 +14,9 @@ use std::io::BufRead;
/// Parsers for RDF graph serialization formats. /// Parsers for RDF graph serialization formats.
/// ///
/// It currently supports the following formats: /// It currently supports the following formats:
/// * [N-Triples](https://www.w3.org/TR/n-triples/) ([`GraphFormat::NTriples`](super::GraphFormat::NTriples)) /// * [N-Triples](https://www.w3.org/TR/n-triples/) ([`GraphFormat::NTriples`])
/// * [Turtle](https://www.w3.org/TR/turtle/) ([`GraphFormat::Turtle`](super::GraphFormat::Turtle)) /// * [Turtle](https://www.w3.org/TR/turtle/) ([`GraphFormat::Turtle`])
/// * [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/) ([`GraphFormat::RdfXml`](super::GraphFormat::RdfXml)) /// * [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/) ([`GraphFormat::RdfXml`])
/// ///
/// ``` /// ```
/// use oxigraph::io::{GraphFormat, GraphParser}; /// use oxigraph::io::{GraphFormat, GraphParser};
@ -67,7 +67,7 @@ impl GraphParser {
Ok(self) Ok(self)
} }
/// Executes the parsing itself on a [`BufRead`](std::io::BufRead) implementation and returns an iterator of triples. /// Executes the parsing itself on a [`BufRead`] implementation and returns an iterator of triples.
#[allow(clippy::unnecessary_wraps)] #[allow(clippy::unnecessary_wraps)]
pub fn read_triples<R: BufRead>(&self, reader: R) -> Result<TripleReader<R>, ParseError> { pub fn read_triples<R: BufRead>(&self, reader: R) -> Result<TripleReader<R>, ParseError> {
Ok(TripleReader { Ok(TripleReader {
@ -167,8 +167,8 @@ impl<R: BufRead> TripleReader<R> {
/// A parser for RDF dataset serialization formats. /// A parser for RDF dataset serialization formats.
/// ///
/// It currently supports the following formats: /// It currently supports the following formats:
/// * [N-Quads](https://www.w3.org/TR/n-quads/) ([`DatasetFormat::NQuads`](super::DatasetFormat::NQuads)) /// * [N-Quads](https://www.w3.org/TR/n-quads/) ([`DatasetFormat::NQuads`])
/// * [TriG](https://www.w3.org/TR/trig/) ([`DatasetFormat::TriG`](super::DatasetFormat::TriG)) /// * [TriG](https://www.w3.org/TR/trig/) ([`DatasetFormat::TriG`])
/// ///
/// ``` /// ```
/// use oxigraph::io::{DatasetFormat, DatasetParser}; /// use oxigraph::io::{DatasetFormat, DatasetParser};
@ -219,7 +219,7 @@ impl DatasetParser {
Ok(self) Ok(self)
} }
/// Executes the parsing itself on a [`BufRead`](std::io::BufRead) implementation and returns an iterator of quads. /// Executes the parsing itself on a [`BufRead`] implementation and returns an iterator of quads.
#[allow(clippy::unnecessary_wraps)] #[allow(clippy::unnecessary_wraps)]
pub fn read_quads<R: BufRead>(&self, reader: R) -> Result<QuadReader<R>, ParseError> { pub fn read_quads<R: BufRead>(&self, reader: R) -> Result<QuadReader<R>, ParseError> {
Ok(QuadReader { Ok(QuadReader {

@ -10,9 +10,9 @@ use std::io::{self, Write};
/// A serializer for RDF graph serialization formats. /// A serializer for RDF graph serialization formats.
/// ///
/// It currently supports the following formats: /// It currently supports the following formats:
/// * [N-Triples](https://www.w3.org/TR/n-triples/) ([`GraphFormat::NTriples`](super::GraphFormat::NTriples)) /// * [N-Triples](https://www.w3.org/TR/n-triples/) ([`GraphFormat::NTriples`])
/// * [Turtle](https://www.w3.org/TR/turtle/) ([`GraphFormat::Turtle`](super::GraphFormat::Turtle)) /// * [Turtle](https://www.w3.org/TR/turtle/) ([`GraphFormat::Turtle`])
/// * [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/) ([`GraphFormat::RdfXml`](super::GraphFormat::RdfXml)) /// * [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/) ([`GraphFormat::RdfXml`])
/// ///
/// ``` /// ```
/// use oxigraph::io::{GraphFormat, GraphSerializer}; /// use oxigraph::io::{GraphFormat, GraphSerializer};
@ -41,7 +41,7 @@ impl GraphSerializer {
Self { format } Self { format }
} }
/// Returns a [`TripleWriter`] allowing writing triples into the given [`Write`](std::io::Write) implementation /// Returns a [`TripleWriter`] allowing writing triples into the given [`Write`] implementation
pub fn triple_writer<W: Write>(&self, writer: W) -> io::Result<TripleWriter<W>> { pub fn triple_writer<W: Write>(&self, writer: W) -> io::Result<TripleWriter<W>> {
Ok(TripleWriter { Ok(TripleWriter {
formatter: match self.format { formatter: match self.format {
@ -152,8 +152,8 @@ impl<W: Write> TripleWriter<W> {
/// A serializer for RDF graph serialization formats. /// A serializer for RDF graph serialization formats.
/// ///
/// It currently supports the following formats: /// It currently supports the following formats:
/// * [N-Quads](https://www.w3.org/TR/n-quads/) ([`DatasetFormat::NQuads`](super::DatasetFormat::NQuads)) /// * [N-Quads](https://www.w3.org/TR/n-quads/) ([`DatasetFormat::NQuads`])
/// * [TriG](https://www.w3.org/TR/trig/) ([`DatasetFormat::TriG`](super::DatasetFormat::TriG)) /// * [TriG](https://www.w3.org/TR/trig/) ([`DatasetFormat::TriG`])
/// ///
/// ``` /// ```
/// use oxigraph::io::{DatasetFormat, DatasetSerializer}; /// use oxigraph::io::{DatasetFormat, DatasetSerializer};
@ -183,7 +183,7 @@ impl DatasetSerializer {
Self { format } Self { format }
} }
/// Returns a [`QuadWriter`] allowing writing triples into the given [`Write`](std::io::Write) implementation /// Returns a [`QuadWriter`] allowing writing triples into the given [`Write`] implementation
#[allow(clippy::unnecessary_wraps)] #[allow(clippy::unnecessary_wraps)]
pub fn quad_writer<W: Write>(&self, writer: W) -> io::Result<QuadWriter<W>> { pub fn quad_writer<W: Write>(&self, writer: W) -> io::Result<QuadWriter<W>> {
Ok(QuadWriter { Ok(QuadWriter {

@ -52,7 +52,7 @@ use std::time::Duration;
pub trait ServiceHandler { pub trait ServiceHandler {
type Error: Error + Send + Sync + 'static; type Error: Error + Send + Sync + 'static;
/// Evaluates a [`Query`] against a given service identified by a [`NamedNode`](crate::model::NamedNode). /// Evaluates a [`Query`] against a given service identified by a [`NamedNode`].
fn handle(&self, service_name: NamedNode, query: Query) -> Result<QueryResults, Self::Error>; fn handle(&self, service_name: NamedNode, query: Query) -> Result<QueryResults, Self::Error>;
} }

Loading…
Cancel
Save