Skip to main content

WriteToBytes

Trait WriteToBytes 

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

Source

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

fn write_to_bytes<W: WriteBytesExt>(&self, writer: W) -> Result<()>

Source§

impl<P> WriteToBytes for &P
where P: WriteToBytes,

Available on crate feature std only.
Source§

fn write_to_bytes<W: WriteBytesExt>(&self, writer: W) -> Result<()>

Implementors§

Source§

impl WriteToBytes for ReferenceIdentifier

Available on crate feature std only.
Source§

impl WriteToBytes for DateFormat

Available on crate feature std only.
Source§

impl WriteToBytes for Packet

Available on crate feature std only.
Source§

impl WriteToBytes for ShortFormat

Available on crate feature std only.
Source§

impl WriteToBytes for Stratum

Available on crate feature std only.
Source§

impl WriteToBytes for TimestampFormat

Available on crate feature std only.