pub trait AsyncSerializeRefLen<'val, W: AsyncWrite>: AsyncSerializeRef<'val, W> + AsyncWriterFutureLen<W> {
// Required method
fn total_bytes(val: &Self::Serialized) -> usize;
}
👎Deprecated: This was a failed attempt at finding a suitable abstraction. The async-codec crate might be what you need instead.
Expand description
An AsyncSerializeRef
that can precompute the exact number of bytes to write.
Required Methods§
Sourcefn total_bytes(val: &Self::Serialized) -> usize
👎Deprecated: This was a failed attempt at finding a suitable abstraction. The async-codec crate might be what you need instead.
fn total_bytes(val: &Self::Serialized) -> usize
Compute the exact number of bytes that would be written in total if the given value was serialized.
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.