#![doc= include_str!("../README.md")]
mod chart;
pub mod discovery;
mod util;
use std::io;
pub use chart::{Chart, ChartBuilder, Notify};
pub type Id = u64;
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("Could not set up bare socket")]
Construct(io::Error),
#[error("Failed to set Reuse flag on the socket")]
SetReuse(io::Error),
#[error("Failed to set Broadcast flag on the socket")]
SetBroadcast(io::Error),
#[error("Failed to set Multicast flag on the socket")]
SetMulticast(io::Error),
#[error("Failed to set TTL flag on the socket")]
SetTTL(io::Error),
#[error("Failed to set NonBlocking flag on the socket")]
SetNonBlocking(io::Error),
#[error("Error binding to socket, you might want to try another discovery port and/or enable local_discovery.")]
Bind { error: io::Error, port: u16 },
#[error("Failed joining multicast network")]
JoinMulticast(io::Error),
#[error("Failed to transform blocking to async socket")]
ToTokio(io::Error),
}