Struct Log
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§
§impl Log
impl Log
pub fn new(
address: Address,
topics: Vec<FixedBytes<32>>,
data: Bytes,
) -> Option<Log>
pub fn new( address: Address, topics: Vec<FixedBytes<32>>, data: Bytes, ) -> Option<Log>
Creates a new log.
pub const fn new_unchecked(
address: Address,
topics: Vec<FixedBytes<32>>,
data: Bytes,
) -> Log
pub const fn new_unchecked( address: Address, topics: Vec<FixedBytes<32>>, data: Bytes, ) -> Log
Creates a new log.
§impl<T> Log<T>
impl<T> Log<T>
pub const fn new_from_event_unchecked(address: Address, data: T) -> Log<T>
pub const fn new_from_event_unchecked(address: Address, data: T) -> Log<T>
Creates a new log.
pub fn new_from_event(address: Address, data: T) -> Option<Log<T>>
pub fn new_from_event(address: Address, data: T) -> Option<Log<T>>
Creates a new log from an deserialized event.
pub fn reserialize(&self) -> Log
pub fn reserialize(&self) -> Log
Reserialize the data.
Trait Implementations§
§impl<'de, T> Deserialize<'de> for Log<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Log<T>where
T: Deserialize<'de>,
§fn deserialize<D>(
deserializer: D,
) -> Result<Log<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Log<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<T> Serialize for Log<T>where
T: Serialize,
impl<T> Serialize for Log<T>where
T: Serialize,
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> Eq for Log<T>where
T: Eq,
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
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more