Crate lb_rs

Source
Expand description

The library that underlies most things lockbook.

All lockbook clients (iOS, linux, etc) rely on this library to perform cryptography, offline edits, and reconciliation of data between our server, other clients, and other devices.

Our server relies on this library for checking signatures, and validating whether tree modifications are valid / authorized.

  • Most clients / integrators will be interested in the functions attached to the Lb struct. See the service module for evolving this functionality.
  • The model module contains the specification of our data structures and contracts between components.
  • The blocking module contains blocking variants of all Lb functions for consumers without async runtimes.
  • The io module contains interactions with disk and network.

Re-exports§

pub use model::errors::LbErrKind;
pub use model::errors::LbResult;

Modules§

blocking
io
Members of this model are concerned with the details of IO, generally disk and network. This is the module any on-disk migrations will live and ideas around network, disk, and memory caches will be expressed. Code here should not be platform dependent, and should strive to be suitable for a range of devices: iPhones with flaky networks to servers and workstations with excellent networks.
model
Members of this module specialize in “pure” representation of ideas these could be just where our data model lives or could be expressions of complicated algorithmic or abstract ideas. If you’re writing code in this module it’s expected that you optimize for portability by not using IO, not using async, and generally staying away from locks. It’s expected that code in this module is reasonably easy to test as well.
service
Members of this module comprise the endpoints exposed by the lb crate Members of this module are generally handling concurrency primitives, caches, and pay special attention to the needs of people consuming lb - UI developers and integration engineers. On locking: in general, it is okay to hold a lock for reading a file, but not for multiple files or network I/O
subscribers
members of this module are consumers of the subscription stream of lb-rs

Macros§

unexpected_only

Structs§

Lb
Uuid
A Universally Unique Identifier (UUID).

Statics§

CORE_CODE_VERSION
DEFAULT_API_LOCATION

Functions§

get_code_version