pub struct IndexedDynamicValue<T> {
pub hash: Vec<u8>,
/* private fields */
}
Expand description
Dependencies needed by ‘substreams-abigen’ to generate bindings. Ethereum events with indexed parameters that are of dynamic types like a ‘string’, ‘bytes’ or array of value do not contain the actual value in the log. Instead, they contain a hash of the value. This struct is used to represent such values in the decoded event.
The hash value read can be retrieved from the hash
field, the original value
cannot be retrieved (unless you know it already, in which case you can validate
it fits the current hash).
You can access the hash (also equivalent to the topic in this case) directly on the struct:
ⓘ
let value = IndexedDynamicValue::<String>::new("0x1234".into());
assert_eq!(value.hash, "0x1234".into());
Fields§
§hash: Vec<u8>
The hash of the value that was indexed, not the real value that was actually indexed. The original real value cannot be retrieved.
Implementations§
Trait Implementations§
Source§impl<T: Clone> Clone for IndexedDynamicValue<T>
impl<T: Clone> Clone for IndexedDynamicValue<T>
Source§fn clone(&self) -> IndexedDynamicValue<T>
fn clone(&self) -> IndexedDynamicValue<T>
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<T: Debug> Debug for IndexedDynamicValue<T>
impl<T: Debug> Debug for IndexedDynamicValue<T>
Source§impl<T: PartialEq> PartialEq for IndexedDynamicValue<T>
impl<T: PartialEq> PartialEq for IndexedDynamicValue<T>
impl<T> StructuralPartialEq for IndexedDynamicValue<T>
Auto Trait Implementations§
impl<T> Freeze for IndexedDynamicValue<T>
impl<T> RefUnwindSafe for IndexedDynamicValue<T>where
T: RefUnwindSafe,
impl<T> Send for IndexedDynamicValue<T>where
T: Send,
impl<T> Sync for IndexedDynamicValue<T>where
T: Sync,
impl<T> Unpin for IndexedDynamicValue<T>where
T: Unpin,
impl<T> UnwindSafe for IndexedDynamicValue<T>where
T: UnwindSafe,
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