pub trait GenTranscribable: Sized {
// Required methods
fn read_transcription_bytes_exact(bytes: &[u8]) -> Self;
fn write_transcription_bytes_exact(&self, buf: &mut [u8]);
}Expand description
Common trait for both Transcribable and ConstTranscribable to avoid code
duplication in their implementations.
Required Methods§
Sourcefn read_transcription_bytes_exact(bytes: &[u8]) -> Self
fn read_transcription_bytes_exact(bytes: &[u8]) -> Self
Creates a new instance from a byte buffer. The buffer must be exactly the expected length.
Sourcefn write_transcription_bytes_exact(&self, buf: &mut [u8])
fn write_transcription_bytes_exact(&self, buf: &mut [u8])
Transcribes the current instance into a byte buffer. The buffer must be exactly the expected length.
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.