Skip to main content

ReadBytes

Trait ReadBytes 

Source
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§

Source

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§

Source§

impl<R> ReadBytes for R
where R: ReadBytesExt,

Available on crate feature std only.