1#![doc= include_str!("../README.md")]
2
3mod chart;
4pub mod discovery;
5mod util;
6use std::io;
7
8pub use chart::{Chart, ChartBuilder, Notify};
9
10pub type Id = u64;
12
13#[derive(thiserror::Error, Debug)]
16pub enum Error {
17 #[error("Could not set up bare socket")]
19 Construct(io::Error),
20 #[error("Failed to set Reuse flag on the socket")]
22 SetReuse(io::Error),
23 #[error("Failed to set Broadcast flag on the socket")]
25 SetBroadcast(io::Error),
26 #[error("Failed to set Multicast flag on the socket")]
28 SetMulticast(io::Error),
29 #[error("Failed to set TTL flag on the socket")]
31 SetTTL(io::Error),
32 #[error("Failed to set NonBlocking flag on the socket")]
34 SetNonBlocking(io::Error),
35 #[error("Error binding to socket, you might want to try another discovery port and/or enable local_discovery.")]
37 Bind { error: io::Error, port: u16 },
38 #[error("Failed joining multicast network")]
40 JoinMulticast(io::Error),
41 #[error("Failed to transform blocking to async socket")]
43 ToTokio(io::Error),
44}