Trait domain::base::octets::OctetsInto
source · pub trait OctetsInto<Target> {
// Required method
fn octets_into(self) -> Result<Target, ShortBuf>;
}
Expand description
Convert a type from one octets type to another.
This trait allows trading in a value of a type that is generic over an octets sequence for an identical value using a different type of octets sequence.
This is different from just Into
in that the conversion may fail if the
source sequence is longer than the space available for the target type.
This trait has a blanket implementation for all pairs of types where
OctetsFrom
has been implemented.
Required Methods§
sourcefn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.