pub struct LogData {
pub data: Bytes,
/* private fields */
}
Expand description
An Ethereum event log object.
Fields§
§data: Bytes
The plain data.
Implementations§
Source§impl LogData
impl LogData
Sourcepub const fn new_unchecked(topics: Vec<B256>, data: Bytes) -> Self
pub const fn new_unchecked(topics: Vec<B256>, data: Bytes) -> Self
Creates a new log, without length-checking. This allows creation of invalid logs. May be safely used when the length of the topic list is known to be 4 or less.
Sourcepub fn topics_mut(&mut self) -> &mut [B256]
pub fn topics_mut(&mut self) -> &mut [B256]
Get the topic list, mutably. This gives access to the internal array, without allowing extension of that array.
Sourcepub fn topics_mut_unchecked(&mut self) -> &mut Vec<B256>
pub fn topics_mut_unchecked(&mut self) -> &mut Vec<B256>
Get a mutable reference to the topic list. This allows creation of invalid logs.
Sourcepub fn set_topics_unchecked(&mut self, topics: Vec<B256>)
pub fn set_topics_unchecked(&mut self, topics: Vec<B256>)
Set the topic list, without length-checking. This allows creation of invalid logs.
Sourcepub fn set_topics_truncating(&mut self, topics: Vec<B256>)
pub fn set_topics_truncating(&mut self, topics: Vec<B256>)
Set the topic list, truncating to 4 topics.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for LogData
impl<'arbitrary> Arbitrary<'arbitrary> for LogData
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§impl Arbitrary for LogData
impl Arbitrary for LogData
Source§type Parameters = (<Vec<FixedBytes<32>> as Arbitrary>::Parameters, <Bytes as Arbitrary>::Parameters)
type Parameters = (<Vec<FixedBytes<32>> as Arbitrary>::Parameters, <Bytes as Arbitrary>::Parameters)
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.Source§type Strategy = Map<(<Vec<FixedBytes<32>> as Arbitrary>::Strategy, <Bytes as Arbitrary>::Strategy), fn(_: (Vec<FixedBytes<32>>, Bytes)) -> LogData>
type Strategy = Map<(<Vec<FixedBytes<32>> as Arbitrary>::Strategy, <Bytes as Arbitrary>::Strategy), fn(_: (Vec<FixedBytes<32>>, Bytes)) -> LogData>
The type of
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
Source§impl<'de> Deserialize<'de> for LogData
impl<'de> Deserialize<'de> for LogData
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl IntoLogData for LogData
impl IntoLogData for LogData
Source§fn to_log_data(&self) -> LogData
fn to_log_data(&self) -> LogData
Convert into a
LogData
object.Source§fn into_log_data(self) -> LogData
fn into_log_data(self) -> LogData
Consume and convert into a
LogData
object.impl Eq for LogData
impl StructuralPartialEq for LogData
Auto Trait Implementations§
impl !Freeze for LogData
impl RefUnwindSafe for LogData
impl Send for LogData
impl Sync for LogData
impl Unpin for LogData
impl UnwindSafe for LogData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.