pub trait FromWire<W>: Sized {
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _;
// Required method
fn from_wire(wire: W) -> Self;
}
Expand description
A type which is convertible from a wire type.
Provided Associated Constants§
Sourceconst COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Whether the conversion from W
to Self
is equivalent to copying the raw bytes of W
.
Copy optimization is disabled by default.
Required Methods§
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.