Trait FromWire
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§
const 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§
fn from_wire(wire: W) -> Self
fn from_wire(wire: W) -> Self
Converts the given wire
to this type.
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.