bee_network/error.rs
1// Copyright 2020-2021 IOTA Stiftung
2// SPDX-License-Identifier: Apache-2.0
3
4#![cfg(feature = "full")]
5
6/// Errors during network initialization.
7#[derive(Debug, thiserror::Error)]
8pub enum Error {
9 /// Publishing the local (peer) id failed.
10 #[error("Failed to announce local id")]
11 LocalIdAnnouncementFailed,
12
13 /// Publishing the list of static peers failed.
14 #[error("Failed to announce static peers.")]
15 StaticPeersAnnouncementFailed,
16
17 /// Creating transport layer failed.
18 #[error("Failed to create transport layer.")]
19 CreatingTransportFailed,
20
21 /// Binding to an address failed.
22 #[error("Failed to bind to an address.")]
23 BindingAddressFailed,
24
25 /// An error occurred in the [`Host`] event loop.
26 #[error("Failed to process an item in the host processor event loop.")]
27 HostEventLoopError,
28}