pub trait WriteBytes {
// Required method
fn write_bytes<P: WriteToBytes>(&mut self, protocol: P) -> Result<()>;
}Expand description
A trait for writing any of the Network Time Protocol types to network-endian bytes.
A blanket implementation is provided for all types that implement byteorder::WriteBytesExt.
Requires the std feature.
Required Methods§
Sourcefn write_bytes<P: WriteToBytes>(&mut self, protocol: P) -> Result<()>
fn write_bytes<P: WriteToBytes>(&mut self, protocol: P) -> Result<()>
Writes an NTP protocol type to this writer 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<W> WriteBytes for Wwhere
W: WriteBytesExt,
Available on crate feature
std only.