pub struct SerializeAbiValueParams {
pub big_numbers_as_hex: bool,
pub small_numbers_as_is: bool,
}Expand description
Serialization params for AbiValue.
Fields§
§big_numbers_as_hex: boolInteger types with bit width greater than 128
will be serialized as hex (with 0x prefix).
Default: false.
small_numbers_as_is: boolInteger values with bit len not greater than 53 will be serialized as is (e.g. as JSON numbers).
Default: false.
Implementations§
Source§impl SerializeAbiValueParams
impl SerializeAbiValueParams
Sourcepub const NUMBERS_AS_HEX_THRESHOLD: u16 = 128
pub const NUMBERS_AS_HEX_THRESHOLD: u16 = 128
Number of bits after which the number will be serialized as hex.
Sourcepub const NUMBERS_AS_IS_THRESHOLD: u16 = 53
pub const NUMBERS_AS_IS_THRESHOLD: u16 = 53
Number of bits before which the number will be serialized as is (e.g. as JSON number).
See [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER].
Trait Implementations§
Source§impl Clone for SerializeAbiValueParams
impl Clone for SerializeAbiValueParams
Source§fn clone(&self) -> SerializeAbiValueParams
fn clone(&self) -> SerializeAbiValueParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SerializeAbiValueParams
impl Debug for SerializeAbiValueParams
Source§impl Default for SerializeAbiValueParams
impl Default for SerializeAbiValueParams
Source§fn default() -> SerializeAbiValueParams
fn default() -> SerializeAbiValueParams
Returns the “default value” for a type. Read more
impl Copy for SerializeAbiValueParams
Auto Trait Implementations§
impl Freeze for SerializeAbiValueParams
impl RefUnwindSafe for SerializeAbiValueParams
impl Send for SerializeAbiValueParams
impl Sync for SerializeAbiValueParams
impl Unpin for SerializeAbiValueParams
impl UnsafeUnpin for SerializeAbiValueParams
impl UnwindSafe for SerializeAbiValueParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more