Enum omniflix_std::types::ics23::LengthOp
source · #[repr(i32)]pub enum LengthOp {
NoPrefix = 0,
VarProto = 1,
VarRlp = 2,
Fixed32Big = 3,
Fixed32Little = 4,
Fixed64Big = 5,
Fixed64Little = 6,
Require32Bytes = 7,
Require64Bytes = 8,
}
Expand description
LengthOp defines how to process the key and value of the LeafOp to include length information. After encoding the length with the given algorithm, the length will be prepended to the key and value bytes. (Each one with it’s own encoded length)
Variants§
NoPrefix = 0
NO_PREFIX don’t include any length info
VarProto = 1
VAR_PROTO uses protobuf (and go-amino) varint encoding of the length
VarRlp = 2
VAR_RLP uses rlp int encoding of the length
Fixed32Big = 3
FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer
Fixed32Little = 4
FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer
Fixed64Big = 5
FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer
Fixed64Little = 6
FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer
Require32Bytes = 7
REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output)
Require64Bytes = 8
REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output)
Implementations§
source§impl LengthOp
impl LengthOp
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LengthOp
impl<'de> Deserialize<'de> for LengthOp
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl JsonSchema for LengthOp
impl JsonSchema for LengthOp
source§fn schema_name() -> String
fn schema_name() -> String
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moresource§impl Ord for LengthOp
impl Ord for LengthOp
source§impl PartialEq for LengthOp
impl PartialEq for LengthOp
source§impl PartialOrd for LengthOp
impl PartialOrd for LengthOp
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for LengthOp
impl Eq for LengthOp
impl StructuralEq for LengthOp
impl StructuralPartialEq for LengthOp
Auto Trait Implementations§
impl RefUnwindSafe for LengthOp
impl Send for LengthOp
impl Sync for LengthOp
impl Unpin for LengthOp
impl UnwindSafe for LengthOp
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere T: CastFrom<U>,
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read more