From 1eaa77ad93416f912d21bbf589545705072ee1b7 Mon Sep 17 00:00:00 2001 From: Tpt Date: Fri, 1 Sep 2023 17:10:05 +0200 Subject: [PATCH] Uses new rustdoc
style --- lib/oxrdf/src/dataset.rs | 5 +++-- lib/oxrdf/src/graph.rs | 5 +++-- lib/oxrdfio/src/serializer.rs | 16 ++++++++-------- lib/oxsdatatypes/src/double.rs | 2 +- lib/oxsdatatypes/src/float.rs | 2 +- lib/sparesults/src/lib.rs | 2 +- lib/src/io/write.rs | 4 ++-- lib/src/sparql/algebra.rs | 2 -- lib/src/store.rs | 34 +++++++++++++++++----------------- 9 files changed, 36 insertions(+), 36 deletions(-) diff --git a/lib/oxrdf/src/dataset.rs b/lib/oxrdf/src/dataset.rs index e5688cb9..017825b0 100644 --- a/lib/oxrdf/src/dataset.rs +++ b/lib/oxrdf/src/dataset.rs @@ -39,8 +39,9 @@ use std::hash::{Hash, Hasher}; /// An in-memory [RDF dataset](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset). /// /// It can accommodate a fairly large number of quads (in the few millions). -/// Beware: it interns the string and does not do any garbage collection yet: -/// if you insert and remove a lot of different terms, memory will grow without any reduction. +/// +///
It interns the strings and does not do any garbage collection yet: +/// if you insert and remove a lot of different terms, memory will grow without any reduction.
/// /// Usage example: /// ``` diff --git a/lib/oxrdf/src/graph.rs b/lib/oxrdf/src/graph.rs index a40d1293..980e3ebf 100644 --- a/lib/oxrdf/src/graph.rs +++ b/lib/oxrdf/src/graph.rs @@ -29,8 +29,9 @@ use std::fmt; /// An in-memory [RDF graph](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-graph). /// /// It can accommodate a fairly large number of triples (in the few millions). -/// Beware: it interns the string and does not do any garbage collection yet: -/// if you insert and remove a lot of different terms, memory will grow without any reduction. +/// +///
It interns the string and does not do any garbage collection yet: +/// if you insert and remove a lot of different terms, memory will grow without any reduction.
/// /// Usage example: /// ``` diff --git a/lib/oxrdfio/src/serializer.rs b/lib/oxrdfio/src/serializer.rs index 6289ed28..0d931d81 100644 --- a/lib/oxrdfio/src/serializer.rs +++ b/lib/oxrdfio/src/serializer.rs @@ -62,9 +62,9 @@ impl RdfSerializer { /// Writes to a [`Write`] implementation. /// - /// Warning: Do not forget to run the [`finish`](ToWriteQuadWriter::finish()) method to properly write the last bytes of the file. + ///
Do not forget to run the [`finish`](ToWriteQuadWriter::finish()) method to properly write the last bytes of the file.
/// - /// Warning: This writer does unbuffered writes. You might want to use [`BufWriter`](io::BufWriter) to avoid that. + ///
This writer does unbuffered writes. You might want to use [`BufWriter`](io::BufWriter) to avoid that.
/// /// ``` /// use oxrdfio::{RdfFormat, RdfSerializer}; @@ -107,9 +107,9 @@ impl RdfSerializer { /// Writes to a Tokio [`AsyncWrite`] implementation. /// - /// Warning: Do not forget to run the [`finish`](ToTokioAsyncWriteQuadWriter::finish()) method to properly write the last bytes of the file. + ///
Do not forget to run the [`finish`](ToTokioAsyncWriteQuadWriter::finish()) method to properly write the last bytes of the file.
/// - /// Warning: This writer does unbuffered writes. You might want to use [`BufWriter`](tokio::io::BufWriter) to avoid that. + ///
This writer does unbuffered writes. You might want to use [`BufWriter`](tokio::io::BufWriter) to avoid that.
/// /// ``` /// use oxrdfio::{RdfFormat, RdfSerializer}; @@ -163,9 +163,9 @@ impl RdfSerializer { /// /// Can be built using [`RdfSerializer::serialize_to_write`]. /// -/// Warning: Do not forget to run the [`finish`](ToWriteQuadWriter::finish()) method to properly write the last bytes of the file. +///
Do not forget to run the [`finish`](ToWriteQuadWriter::finish()) method to properly write the last bytes of the file.
/// -/// Warning: This writer does unbuffered writes. You might want to use [`BufWriter`](io::BufWriter) to avoid that. +///
This writer does unbuffered writes. You might want to use [`BufWriter`](io::BufWriter) to avoid that.
/// /// ``` /// use oxrdfio::{RdfFormat, RdfSerializer}; @@ -232,9 +232,9 @@ impl ToWriteQuadWriter { /// /// Can be built using [`RdfSerializer::serialize_to_write`]. /// -/// Warning: Do not forget to run the [`finish`](ToWriteQuadWriter::finish()) method to properly write the last bytes of the file. +///
Do not forget to run the [`finish`](ToWriteQuadWriter::finish()) method to properly write the last bytes of the file.
/// -/// Warning: This writer does unbuffered writes. You might want to use [`BufWriter`](io::BufWriter) to avoid that. +///
This writer does unbuffered writes. You might want to use [`BufWriter`](io::BufWriter) to avoid that.
/// /// ``` /// use oxrdfio::{RdfFormat, RdfSerializer}; diff --git a/lib/oxsdatatypes/src/double.rs b/lib/oxsdatatypes/src/double.rs index d0c77c8a..bc040738 100644 --- a/lib/oxsdatatypes/src/double.rs +++ b/lib/oxsdatatypes/src/double.rs @@ -9,7 +9,7 @@ use std::str::FromStr; /// /// Uses internally a [`f64`]. /// -/// Beware: serialization is currently buggy and do not follow the canonical mapping yet. +///
Serialization does not follow the canonical mapping.
#[derive(Debug, Clone, Copy, Default, PartialEq)] #[repr(transparent)] pub struct Double { diff --git a/lib/oxsdatatypes/src/float.rs b/lib/oxsdatatypes/src/float.rs index 1feac769..996a6401 100644 --- a/lib/oxsdatatypes/src/float.rs +++ b/lib/oxsdatatypes/src/float.rs @@ -9,7 +9,7 @@ use std::str::FromStr; /// /// Uses internally a [`f32`]. /// -/// Beware: serialization is currently buggy and do not follow the canonical mapping yet. +///
Serialization does not follow the canonical mapping.
#[derive(Debug, Clone, Copy, Default, PartialEq)] #[repr(transparent)] pub struct Float { diff --git a/lib/sparesults/src/lib.rs b/lib/sparesults/src/lib.rs index 7d1a6729..5daa2bd9 100644 --- a/lib/sparesults/src/lib.rs +++ b/lib/sparesults/src/lib.rs @@ -479,7 +479,7 @@ impl QueryResultsSerializer { /// Allows writing query results. /// Could be built using a [`QueryResultsSerializer`]. /// -/// Warning: Do not forget to run the [`finish`](SolutionsWriter::finish()) method to properly write the last bytes of the file. +///
Do not forget to run the [`finish`](SolutionsWriter::finish()) method to properly write the last bytes of the file.
/// /// Example in TSV (the API is the same for JSON and XML): /// ``` diff --git a/lib/src/io/write.rs b/lib/src/io/write.rs index 26a8c441..df1cab61 100644 --- a/lib/src/io/write.rs +++ b/lib/src/io/write.rs @@ -55,7 +55,7 @@ impl GraphSerializer { /// Allows writing triples. /// Could be built using a [`GraphSerializer`]. /// -/// Warning: Do not forget to run the [`finish`](TripleWriter::finish()) method to properly write the last bytes of the file. +///
Do not forget to run the [`finish`](TripleWriter::finish()) method to properly write the last bytes of the file.
/// /// ``` /// use oxigraph::io::{GraphFormat, GraphSerializer}; @@ -138,7 +138,7 @@ impl DatasetSerializer { /// Allows writing triples. /// Could be built using a [`DatasetSerializer`]. /// -/// Warning: Do not forget to run the [`finish`](QuadWriter::finish()) method to properly write the last bytes of the file. +///
Do not forget to run the [`finish`](QuadWriter::finish()) method to properly write the last bytes of the file.
/// /// ``` /// use oxigraph::io::{DatasetFormat, DatasetSerializer}; diff --git a/lib/src/sparql/algebra.rs b/lib/src/sparql/algebra.rs index f468e69e..17b6cc05 100644 --- a/lib/src/sparql/algebra.rs +++ b/lib/src/sparql/algebra.rs @@ -1,8 +1,6 @@ //! [SPARQL 1.1 Query Algebra](https://www.w3.org/TR/sparql11-query/#sparqlQuery) //! //! The root type for SPARQL queries is [`Query`] and the root type for updates is [`Update`]. -//! -//! Warning: this implementation is an unstable work in progress use crate::model::*; use crate::sparql::eval::Timer; diff --git a/lib/src/store.rs b/lib/src/store.rs index 9bba3c3b..a6215707 100644 --- a/lib/src/store.rs +++ b/lib/src/store.rs @@ -213,7 +213,7 @@ impl Store { /// Executes a [SPARQL 1.1 query](https://www.w3.org/TR/sparql11-query/) with some options and /// returns a query explanation with some statistics (if enabled with the `with_stats` parameter). /// - /// Beware: if you want to compute statistics you need to exhaust the results iterator before having a look at them. + ///
If you want to compute statistics you need to exhaust the results iterator before having a look at them.
/// /// Usage example serialising the explanation with statistics in JSON: /// ``` @@ -324,7 +324,7 @@ impl Store { /// Returns the number of quads in the store. /// - /// Warning: this function executes a full scan. + ///
This function executes a full scan.
/// /// Usage example: /// ``` @@ -565,7 +565,7 @@ impl Store { /// Adds atomically a set of quads to this store. /// - /// Warning: This operation uses a memory heavy transaction internally, use the [`bulk_loader`](Store::bulk_loader) if you plan to add ten of millions of triples. + ///
This operation uses a memory heavy transaction internally, use the [`bulk_loader`](Store::bulk_loader) if you plan to add ten of millions of triples.
pub fn extend( &self, quads: impl IntoIterator>, @@ -815,7 +815,7 @@ impl Store { /// /// Useful to call after a batch upload or another similar operation. /// - /// Warning: Can take hours on huge databases. + ///
Can take hours on huge databases.
#[cfg(not(target_family = "wasm"))] pub fn optimize(&self) -> Result<(), StorageError> { self.storage.compact() @@ -826,10 +826,10 @@ impl Store { /// After its creation, the backup is usable using [`Store::open`] /// like a regular Oxigraph database and operates independently from the original database. /// - /// Warning: Backups are only possible for on-disk databases created using [`Store::open`]. + ///
Backups are only possible for on-disk databases created using [`Store::open`].
/// Temporary in-memory databases created using [`Store::new`] are not compatible with RocksDB backup system. /// - /// Warning: An error is raised if the `target_directory` already exists. + ///
An error is raised if the `target_directory` already exists.
/// /// If the target directory is in the same file system as the current database, /// the database content will not be fully copied @@ -1012,7 +1012,7 @@ impl<'a> Transaction<'a> { /// Returns the number of quads in the store. /// - /// Warning: this function executes a full scan. + ///
this function executes a full scan.
pub fn len(&self) -> Result { self.writer.reader().len() } @@ -1364,11 +1364,11 @@ impl Iterator for GraphNameIter { /// A bulk loader allowing to load at lot of data quickly into the store. /// -/// Warning: The operations provided here are not atomic. +///
The operations provided here are not atomic.
/// If the operation fails in the middle, only a part of the data may be written to the store. /// Results might get weird if you delete data during the loading process. /// -/// Warning: It is optimized for speed. +///
It is optimized for speed.
/// Memory usage is configurable using [`BulkLoader::set_max_memory_size_in_megabytes`] /// and the number of used threads with [`BulkLoader::set_num_threads`]. /// By default the memory consumption target (excluding the system and RocksDB internal consumption) @@ -1452,11 +1452,11 @@ impl BulkLoader { /// /// This function is optimized for large dataset loading speed. For small files, [`Store::load_dataset`] might be more convenient. /// - /// Warning: This method is not atomic. + ///
This method is not atomic.
/// If the parsing fails in the middle of the file, only a part of it may be written to the store. /// Results might get weird if you delete data during the loading process. /// - /// Warning: This method is optimized for speed. See [the struct](BulkLoader) documentation for more details. + ///
This method is optimized for speed. See [the struct](BulkLoader) documentation for more details.
/// /// Usage example: /// ``` @@ -1510,11 +1510,11 @@ impl BulkLoader { /// /// This function is optimized for large graph loading speed. For small files, [`Store::load_graph`] might be more convenient. /// - /// Warning: This method is not atomic. + ///
This method is not atomic.
/// If the parsing fails in the middle of the file, only a part of it may be written to the store. /// Results might get weird if you delete data during the loading process. /// - /// Warning: This method is optimized for speed. See [the struct](BulkLoader) documentation for more details. + ///
This method is optimized for speed. See [the struct](BulkLoader) documentation for more details.
/// /// Usage example: /// ``` @@ -1570,11 +1570,11 @@ impl BulkLoader { /// Adds a set of quads using the bulk loader. /// - /// Warning: This method is not atomic. + ///
This method is not atomic.
/// If the process fails in the middle of the file, only a part of the data may be written to the store. /// Results might get weird if you delete data during the loading process. /// - /// Warning: This method is optimized for speed. See [the struct](BulkLoader) documentation for more details. + ///
This method is optimized for speed. See [the struct](BulkLoader) documentation for more details.
pub fn load_quads( &self, quads: impl IntoIterator>, @@ -1584,11 +1584,11 @@ impl BulkLoader { /// Adds a set of quads using the bulk loader while breaking in the middle of the process in case of error. /// - /// Warning: This method is not atomic. + ///
This method is not atomic.
/// If the process fails in the middle of the file, only a part of the data may be written to the store. /// Results might get weird if you delete data during the loading process. /// - /// Warning: This method is optimized for speed. See [the struct](BulkLoader) documentation for more details. + ///
This method is optimized for speed. See [the struct](BulkLoader) documentation for more details.
pub fn load_ok_quads + From>( &self, quads: impl IntoIterator, EI>>,