pub trait ReadBytes {
// Required method
fn read_bytes<P: ReadFromBytes>(&mut self) -> Result<P>;
}Expand description
A trait for reading any of the Network Time Protocol types from network-endian bytes.
A blanket implementation is provided for all types that implement byteorder::ReadBytesExt.
Requires the std feature.
Required Methods§
Sourcefn read_bytes<P: ReadFromBytes>(&mut self) -> Result<P>
fn read_bytes<P: ReadFromBytes>(&mut self) -> Result<P>
Reads an NTP protocol type from this reader in network byte order.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<R> ReadBytes for Rwhere
R: ReadBytesExt,
Available on crate feature
std only.