Module lockchain_core::traits[][src]

Common vault traits for plugin-crates

The core of this crate has no functionality and is dependant on other libraries to fill those holes. To make this easer (and sometimes possible), we defined a few common behaviours in traits to expand on in implementations specific to the library.

Each trait is documented in more detail and provides default implementations with unimplemented! macros to make compilation work without external crates but not calling functions at runtime.

Traits

AutoEncoder

Auto-implement this trait to serialise types to json

Base64AutoEncoder

Include this trait to monkey-patch base64 functions onto String types

Body

A Body trait that can be implemented to hook into the generic Record data module.

Encryptable

This is purely a marker trait for encryptable types

EncryptionHandler

A base trait that describes the basic functionality of an encryption backend which handles encrypted files.

FileIO

An abstract file loading utility trait

LoadRecord

A simple trait that allows libraries to hook into the body() and record() hooks for vault records.

Vault

Trait for an in-memory representation of a lockchain vault.