Crate libpijul [−] [src]
Reexports
pub use patch::Patch; |
pub use patch::PatchHeader; |
Modules
fs_representation |
Layout of a repository (files in |
graph |
The data structures representing contents of a Pijul repository in memory at specific point in time. This representation is used to compute the order on the chunks of a file, possibly detecting conflicts in the process. |
patch |
Definition of patches, and a number of methods. |
Structs
Branch |
The representation of a branch. The "application number" of a patch on a branch is the state of the application counter at the time the patch has been applied to that branch. |
Edge |
The target half of an edge in the repository graph. |
EdgeFlags |
Possible flags of edges. |
Error |
The Error type. |
Inode |
A unique identifier for files or directories in the actual file system, to map "files from the graph" to real files. |
Key |
A node in the repository graph, made of a patch internal identifier, and a line identifier in that patch. |
LineId |
An index for file chunks within a patch. |
PatchId |
An internal patch identifier, less random than external patch identifiers, but more stable in time, and much smaller. |
Repository |
A repository. All operations on repositories must be done via transactions. |
SmallStr |
A borrowed version of |
SmallString |
A string of length at most 255, with a more compact on-disk encoding. |
Enums
ErrorKind |
The kind of an error. |
Hash |
The external hash of patches. |
HashRef |
A borrowed version of |
InodeUpdate | |
KeyPair |
A public and secret key. |
Value |
Iterator over parts of a value. On values of size at most 4096 bytes, the iterator will run exactly once. On larger values, it returns all parts of the value, in order. |
Constants
DEFAULT_BRANCH |
The default name of a branch, for users who start working before choosing branch names (or like the default name, "master"). |
DELETED_EDGE |
An edge whose target (if not also |
FOLDER_EDGE |
An edge encoding file system hierarchy. |
PARENT_EDGE |
A "reverse" edge (all edges in the graph have a reverse edge). |
PSEUDO_EDGE |
A pseudo-edge, computed when applying the patch to restore connectivity, and/or mark conflicts. |
ROOT_INODE |
The |
ROOT_KEY |
The node at the root of the repository graph. |
Traits
ResultExt |
Additional methods for |
Transaction |
Trait for operations common to mutable and immutable transactions. |
Functions
apply_resize |
Apply a number of patches, guessing the new repository size. If this fails, the repository size is guaranteed to have been increased by at least some pages, and it is safe to call this function again. |
apply_resize_no_output |
Apply a number of patches, guessing the new repository size. If this fails, the repository size is guaranteed to have been increased by at least some pages, and it is safe to call this function again. |
unrecord_no_resize |
Open the repository, and unrecord the patch, without increasing
the size. If this fails, the repository file is guaranteed to have
been increased by |
Type Definitions
ApplyTimestamp |
The type of patch application numbers. |
MutTxn |
A mutable transaction on a repository. |
Result |
Convenient wrapper around |
Txn |
An immutable transaction on a repository. |