Skip to main content

WriteBytes

Trait WriteBytes 

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

Source

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§

Source§

impl<W> WriteBytes for W
where W: WriteBytesExt,

Available on crate feature std only.