pub trait DataRef<'a, D>:
Copy
+ Debug
+ Send
+ Sync{
// Required method
fn decode(buf: &'a [u8]) -> Result<(usize, Self), DecodeError>
where Self: Sized;
// Provided method
fn decode_length_delimited(
src: &'a [u8],
) -> Result<(usize, Self), DecodeError>
where Self: Sized { ... }
}Expand description
The reference type of the data.
Required Methods§
Provided Methods§
Sourcefn decode_length_delimited(src: &'a [u8]) -> Result<(usize, Self), DecodeError>where
Self: Sized,
fn decode_length_delimited(src: &'a [u8]) -> Result<(usize, Self), DecodeError>where
Self: Sized,
Decodes a length-delimited reference instance of the message from the buffer.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".