Expand description
Structs§
- Codec
Error - A format refused a document. It carries nothing of the document, which may hold secrets.
- File
Source - A table kept in one private file.
- File
Table - A table of
Tkept in one private file: a document with one key,section, holding the list of records, written by codecC. - Source
- Where a table is kept: an object holding exactly one source kind, open to more kinds (a SQL database, an HTTP API) without changing what sits beside it.
- Stamp
- Which writing of a file is there: told apart from any other by when it was written, how long it is and, on Unix, which inode it is (every writing here is a new file put in the old one’s place, and a coarse clock alone cannot tell two apart).
Constants§
- DEFAULT_
MAX_ BYTES - The most a table file may hold unless
FileTable::max_bytessays otherwise: 1 MiB.
Traits§
- Codec
- A serde text format a
FileTablekeeps its records in. The kit names no format: the caller implements this over the format crate it picks.
Functions§
- read_
bounded - Reads the UTF-8 text of the file at
path, refusing more thanmax_bytes.Nonewhen there is no such file: nothing has been kept yet. - stamp
- The stamp of the file at
path;Nonewhen there is no such file. - write_
private - Writes
bytesas the file atpath: beside it first and then in its place, so it is never there half written, readable by its owner alone (0600on Unix), and never written through a link or into a file someone else can read.