pub struct Log<T = LogData> {
pub address: Address,
pub data: T,
}
Expand description
A log consists of an address, and some log data.
Fields§
§address: Address
The address which emitted this log.
data: T
The log data.
Implementations§
Source§impl<T> Log<T>
impl<T> Log<T>
Sourcepub const fn new_from_event_unchecked(address: Address, data: T) -> Self
pub const fn new_from_event_unchecked(address: Address, data: T) -> Self
Creates a new log.
Sourcepub fn new_from_event(address: Address, data: T) -> Option<Self>
pub fn new_from_event(address: Address, data: T) -> Option<Self>
Creates a new log from an deserialized event.
Sourcepub fn reserialize(&self) -> Log<LogData>
pub fn reserialize(&self) -> Log<LogData>
Reserialize the data.
Trait Implementations§
Source§impl<'arbitrary, T: Arbitrary<'arbitrary>> Arbitrary<'arbitrary> for Log<T>
impl<'arbitrary, T: Arbitrary<'arbitrary>> Arbitrary<'arbitrary> for Log<T>
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<T: Arbitrary> Arbitrary for Log<T>
impl<T: Arbitrary> Arbitrary for Log<T>
Source§type Parameters = (<Address as Arbitrary>::Parameters, <T as Arbitrary>::Parameters)
type Parameters = (<Address as Arbitrary>::Parameters, <T 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<(<Address as Arbitrary>::Strategy, <T as Arbitrary>::Strategy), fn(_: (Address, T)) -> Log<T>>
type Strategy = Map<(<Address as Arbitrary>::Strategy, <T as Arbitrary>::Strategy), fn(_: (Address, T)) -> Log<T>>
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, T: Deserialize<'de>> Deserialize<'de> for Log<T>
Available on crate feature serde
only.
impl<'de, T: Deserialize<'de>> Deserialize<'de> for Log<T>
Available on crate feature
serde
only.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<'a> Extend<&'a Log> for Bloom
impl<'a> Extend<&'a Log> for Bloom
Source§fn extend<T: IntoIterator<Item = &'a Log>>(&mut self, logs: T)
fn extend<T: IntoIterator<Item = &'a Log>>(&mut self, logs: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<'a> FromIterator<&'a Log> for Bloom
impl<'a> FromIterator<&'a Log> for Bloom
impl<T: Eq> Eq for Log<T>
impl<T> StructuralPartialEq for Log<T>
Auto Trait Implementations§
impl<T> Freeze for Log<T>where
T: Freeze,
impl<T> RefUnwindSafe for Log<T>where
T: RefUnwindSafe,
impl<T> Send for Log<T>where
T: Send,
impl<T> Sync for Log<T>where
T: Sync,
impl<T> Unpin for Log<T>where
T: Unpin,
impl<T> UnwindSafe for Log<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
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.