Struct alloy_primitives::Log
source · 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<'de, T: Deserialize<'de>> Deserialize<'de> for Log<T>
impl<'de, T: Deserialize<'de>> Deserialize<'de> for Log<T>
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
source§impl<T: PartialEq> PartialEq for Log<T>
impl<T: PartialEq> PartialEq for Log<T>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default 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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.