pub trait ToBytes {
    fn to_bytes(&self) -> &[u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
; }
Expand description

A cheap conversion from typed data to a byte slice.

Given some data, returns the byte representation of that data. No copy of the data should be performed.

See also the FromBytes trait.

Required methods

Converts the provided data to bytes.

Implementations on Foreign Types

Implementors