bee-network 0.2.2

Networking functionality and types for nodes and clients participating in the IOTA protocol built on top of `libp2p`.
Documentation
// Copyright 2020-2021 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

#![cfg(feature = "full")]

/// Errors during network initialization.
#[derive(Debug, thiserror::Error)]
pub enum Error {
    /// Publishing the local (peer) id failed.
    #[error("Failed to announce local id")]
    LocalIdAnnouncementFailed,

    /// Publishing the list of static peers failed.
    #[error("Failed to announce static peers.")]
    StaticPeersAnnouncementFailed,

    /// Creating transport layer failed.
    #[error("Failed to create transport layer.")]
    CreatingTransportFailed,

    /// Binding to an address failed.
    #[error("Failed to bind to an address.")]
    BindingAddressFailed,

    /// An error occurred in the [`Host`] event loop.
    #[error("Failed to process an item in the host processor event loop.")]
    HostEventLoopError,
}