pub trait WriteToBytes {
// Required method
fn write_to_bytes<W: WriteBytesExt>(&self, writer: W) -> Result<()>;
}Expand description
Network Time Protocol types that may be written to network endian bytes.
Requires the std feature.
Required Methods§
Sourcefn write_to_bytes<W: WriteBytesExt>(&self, writer: W) -> Result<()>
fn write_to_bytes<W: WriteBytesExt>(&self, writer: W) -> Result<()>
Write the command to bytes.
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.
Implementations on Foreign Types§
Source§impl WriteToBytes for (LeapIndicator, Version, Mode)
Available on crate feature std only.
impl WriteToBytes for (LeapIndicator, Version, Mode)
Available on crate feature
std only.fn write_to_bytes<W: WriteBytesExt>(&self, writer: W) -> Result<()>
Source§impl<P> WriteToBytes for &Pwhere
P: WriteToBytes,
Available on crate feature std only.
impl<P> WriteToBytes for &Pwhere
P: WriteToBytes,
Available on crate feature
std only.fn write_to_bytes<W: WriteBytesExt>(&self, writer: W) -> Result<()>
Implementors§
impl WriteToBytes for ReferenceIdentifier
Available on crate feature
std only.impl WriteToBytes for DateFormat
Available on crate feature
std only.impl WriteToBytes for Packet
Available on crate feature
std only.impl WriteToBytes for ShortFormat
Available on crate feature
std only.impl WriteToBytes for Stratum
Available on crate feature
std only.impl WriteToBytes for TimestampFormat
Available on crate feature
std only.