Struct LogData
pub struct LogData {
pub data: Bytes,
/* private fields */
}
Expand description
An Ethereum event log object.
Fields§
§data: Bytes
The plain data.
Implementations§
§impl LogData
impl LogData
pub const fn new_unchecked(topics: Vec<FixedBytes<32>>, data: Bytes) -> LogData
pub const fn new_unchecked(topics: Vec<FixedBytes<32>>, data: Bytes) -> LogData
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.
pub fn topics(&self) -> &[FixedBytes<32>]
pub fn topics(&self) -> &[FixedBytes<32>]
Get the topic list.
pub fn topics_mut(&mut self) -> &mut [FixedBytes<32>]
pub fn topics_mut(&mut self) -> &mut [FixedBytes<32>]
Get the topic list, mutably. This gives access to the internal array, without allowing extension of that array.
pub fn topics_mut_unchecked(&mut self) -> &mut Vec<FixedBytes<32>>
pub fn topics_mut_unchecked(&mut self) -> &mut Vec<FixedBytes<32>>
Get a mutable reference to the topic list. This allows creation of invalid logs.
pub fn set_topics_unchecked(&mut self, topics: Vec<FixedBytes<32>>)
pub fn set_topics_unchecked(&mut self, topics: Vec<FixedBytes<32>>)
Set the topic list, without length-checking. This allows creation of invalid logs.
pub fn set_topics_truncating(&mut self, topics: Vec<FixedBytes<32>>)
pub fn set_topics_truncating(&mut self, topics: Vec<FixedBytes<32>>)
Set the topic list, truncating to 4 topics.
pub fn split(self) -> (Vec<FixedBytes<32>>, Bytes)
pub fn split(self) -> (Vec<FixedBytes<32>>, Bytes)
Consumes the log data, returning the topic list and the data.
Trait Implementations§
§impl<'de> Deserialize<'de> for LogData
impl<'de> Deserialize<'de> for LogData
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LogData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LogData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl IntoLogData for LogData
impl IntoLogData for LogData
§fn to_log_data(&self) -> LogData
fn to_log_data(&self) -> LogData
Convert into a
LogData
object.§fn into_log_data(self) -> LogData
fn into_log_data(self) -> LogData
Consume and convert into a
LogData
object.§impl Serialize for LogData
impl Serialize for LogData
§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 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,
§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