pub trait ShapeExt<This>where
This: ShapeAlg,{
// Required methods
fn bytes_hex(&self, len: Option<usize>) -> This::Ty;
fn bytes_array(&self) -> This::Ty;
fn int_decimal(&self, signed: bool, bits: u16) -> This::Ty;
fn int_hex(&self, signed: bool, bits: u16) -> This::Ty;
fn named_product(
&self,
words: Words<'_>,
fields: Vec<This::Field>,
) -> This::Ty;
fn sum_untagged<'w>(
&self,
alternatives: Vec<(Words<'w>, This::Ty)>,
) -> This::Ty;
fn sum_of_names<'w>(&self, names: Vec<Words<'w>>) -> This::Ty;
}Expand description
The shape operations that follow from the primitives alone.
Required Methods§
Sourcefn bytes_array(&self) -> This::Ty
fn bytes_array(&self) -> This::Ty
Bytes written as an array of JSON numbers, which is a sequence of octets and nothing more.
Sourcefn int_decimal(&self, signed: bool, bits: u16) -> This::Ty
fn int_decimal(&self, signed: bool, bits: u16) -> This::Ty
An integer written as decimal digits, for a width a JSON number cannot hold.
Sourcefn int_hex(&self, signed: bool, bits: u16) -> This::Ty
fn int_hex(&self, signed: bool, bits: u16) -> This::Ty
An integer written as a 0x quantity, as the Ethereum JSON-RPC specification states one.
Sourcefn named_product(&self, words: Words<'_>, fields: Vec<This::Field>) -> This::Ty
fn named_product(&self, words: Words<'_>, fields: Vec<This::Field>) -> This::Ty
A named product: the shape most types have.
Sourcefn sum_untagged<'w>(&self, alternatives: Vec<(Words<'w>, This::Ty)>) -> This::Ty
fn sum_untagged<'w>(&self, alternatives: Vec<(Words<'w>, This::Ty)>) -> This::Ty
A choice written as the alternative’s value alone, with no discriminant on the wire.
Sourcefn sum_of_names<'w>(&self, names: Vec<Words<'w>>) -> This::Ty
fn sum_of_names<'w>(&self, names: Vec<Words<'w>>) -> This::Ty
A choice between names alone, which is a choice between name-valued constants.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".