1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! A framework for 'layered' wrappers for byte transformations.
//!
//! This crate provides a framework for writing nested wrappers that operate on bytes, performing
//! operations like en/decryption, (de)compression and (de)serialisation.
//!
//! The end result might allows you to write something like e.g. `SymLockBox<Zstd<>>`.
//!
//! The crate comes built in with a few wrappers, enableable using Cargo features:
//! - `zstd`: [Zstd compression](compression::zstd)
//! - `cbor`: [CBOR serialisation](serialisation::cbor), compatible with serde.
//! - `bare`: [BARE serialisation](serialisation::bare), compatible with serde.
//!
//! No encryption wrappers have been included yet because it would be irresponsible to include
//! unaudited cryptographic tools.
use Cow;
use Error;
/// Helper trait for when it's possible to construct a lamination without any extra inputs at any
/// steps.
/// Helper trait for when it's possible to deconstruct a lamination without any extra inputs at any
/// steps.
/// Helper trait for when it's possible to deconstruct a lamination without any extra inputs at any
/// steps.
/// This variant only borrows the input.
///
/// **EXPERIMENTAL** — may be removed in the future if this does not turn out to be ergonomic.