Files
arrayref
arrayvec
bamboo_rs_core
blake2b_simd
block_buffer
byteorder
cfg_if
constant_time_eq
cpufeatures
crossbeam_channel
crossbeam_deque
crossbeam_epoch
crossbeam_utils
curve25519_dalek
digest
doc_comment
ed25519
ed25519_dalek
either
generic_array
getrandom
hex
keccak
lazy_static
libc
lipmaa_link
memoffset
merlin
num_cpus
opaque_debug
ppv_lite86
proc_macro2
quote
rand
rand_chacha
rand_core
rayon
rayon_core
scopeguard
serde
serde_bytes
serde_derive
sha2
signature
snafu
snafu_derive
static_assertions
subtle
syn
synstructure
typenum
unicode_xid
varu64
yamf_hash
zeroize
zeroize_derive
 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
use crate::entry::decode::Error as EntryDecodeError;
use crate::entry::encode::Error as EntryEncodeError;
use snafu::Snafu;

#[derive(Debug, Snafu)]
#[snafu(visibility = "pub(super)")]
pub enum Error {
    #[snafu(display("Attempting to publish to a feed that is ended (previous entry has set the `is_end_of_feed` bit"))]
    PublishAfterEndOfFeed,
    #[snafu(display("Attempting to publish an entry with a different log_id to the backlink"))]
    PublishWithIncorrectBacklinkLogId,
    #[snafu(display("Attempting to publish an entry with a different log_id to the lipmaa link"))]
    PublishWithIncorrectLipmaaLinkLogId,
    #[snafu(display("Attempting to publish using a keypair that does not have a secret key"))]
    PublishWithoutSecretKey,
    #[snafu(display("Attempting to publish an entry with a different keypair than the backlink"))]
    PublishKeypairDidNotMatchBacklinkPublicKey,
    #[snafu(display(
        "Attempting to publish an entry with a different keypair than the lipmaa link"
    ))]
    PublishKeypairDidNotMatchLipmaaLinkPublicKey,
    #[snafu(display("Attempting to publish an entry that needs a lipmaa link but None provided"))]
    PublishWithoutLipmaaEntry,
    #[snafu(display("Attempting to publish an entry that needs a backlink but None provided"))]
    PublishWithoutBacklinkEntry,
    #[snafu(display("Failed to decode backlink, encoding error: {}", source))]
    DecodeBacklinkEntry { source: EntryDecodeError },
    #[snafu(display("Failed to decode lipmaa link, encoding error: {}", source))]
    DecodeLipmaaEntry { source: EntryDecodeError },
    #[snafu(display(
        "Could not encode the entry into the out buffer. Buffer len: {}, Encoding error: {}",
        buffer_size,
        source
    ))]
    EncodeEntryToOutBuffer {
        source: EntryEncodeError,
        buffer_size: usize,
    },
}

pub type Result<T, E = Error> = core::result::Result<T, E>;