Skip to main content

Module serde_utils

Module serde_utils 

Source

Modules§

blob
block_access_list
bool
Serializes to and deserializes from 0x prefixed hex string
bytes
Serializes to and deserializes from 0x prefixed hex string
bytes48
duration
u32
u64
u128
u256
vec_u8

Functions§

parse_duration
Parses a Duration in string format The acceptable format is a concatentation of positive numeric values (with decimals allowed) followed by a time unit of measurement. The units accepted are: Hours(h), Minutes(m), Senconds(s), Milliseconds(ms), Microseconds (us|µs) and Nanoseconds(ns) For example, a duration such as “1h30m” or “1.6m” will be accepted but “-1s” or “30mh” will not Some imprecision can be expected when using milliseconds/microseconds/nanoseconds with significant decimal components If the format is incorrect this function will return None