pub struct Zero<T>(_);
Expand description
Enforce value to be zero. This type will always encode as evm zero, and will fail on decoding if not zero.
Implementations§
Trait Implementations§
source§impl<T: AbiDecodeZero> AbiDecode for Zero<T>
impl<T: AbiDecodeZero> AbiDecode for Zero<T>
source§impl<T: AbiEncodeZero> AbiEncode for Zero<T>
impl<T: AbiEncodeZero> AbiEncode for Zero<T>
source§impl<T: AbiType> AbiType for Zero<T>
impl<T: AbiType> AbiType for Zero<T>
source§const SIGNATURE: SignatureUnit = T::SIGNATURE
const SIGNATURE: SignatureUnit = T::SIGNATURE
Signature for Ethereum ABI.
source§const HEAD_WORDS: u32 = T::HEAD_WORDS
const HEAD_WORDS: u32 = T::HEAD_WORDS
How many AbiWords static data this type should occupy
source§const IS_DYNAMIC: bool = T::IS_DYNAMIC
const IS_DYNAMIC: bool = T::IS_DYNAMIC
Is this a dynamic type, per spec.
source§impl<T: PartialEq> PartialEq<Zero<T>> for Zero<T>
impl<T: PartialEq> PartialEq<Zero<T>> for Zero<T>
impl<T> StructuralPartialEq for Zero<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Zero<T>where T: RefUnwindSafe,
impl<T> Send for Zero<T>where T: Send,
impl<T> Sync for Zero<T>where T: Sync,
impl<T> Unpin for Zero<T>where T: Unpin,
impl<T> UnwindSafe for Zero<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> AbiEncodeZero for Twhere
T: Default + AbiEncode,
impl<T> AbiEncodeZero for Twhere T: Default + AbiEncode,
fn enc_zero(out: &mut AbiEncoder)
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