mdns-proto 0.1.0

Sans-I/O mDNS protocol implementation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use core::num::NonZeroUsize;

pub use dns_protocol::{BufferType, Error as ProtoError};

#[inline]
pub(super) const fn not_enough_read_data(tried_to_read: usize, available: usize) -> ProtoError {
  ProtoError::NotEnoughReadBytes {
    tried_to_read: NonZeroUsize::new(tried_to_read).unwrap(),
    available,
  }
}

#[inline]
pub(super) const fn proto_error_parse(name: &'static str) -> ProtoError {
  ProtoError::Parse { name }
}