pub struct LogData {
    pub data: Bytes,
    /* private fields */
}Expand description
An Ethereum event log object.
Fields§
§data: BytesThe plain data.
Implementations§
Source§impl LogData
 
impl LogData
Sourcepub 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.
Sourcepub fn topics(&self) -> &[FixedBytes<32>]
 
pub fn topics(&self) -> &[FixedBytes<32>]
Get the topic list.
Sourcepub 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.
Sourcepub const fn topics_mut_unchecked(&mut self) -> &mut Vec<FixedBytes<32>>
 
pub const fn topics_mut_unchecked(&mut self) -> &mut Vec<FixedBytes<32>>
Get a mutable reference to the topic list. This allows creation of invalid logs.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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§
Source§impl<'de> Deserialize<'de> for LogData
 
impl<'de> Deserialize<'de> for LogData
Source§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
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.Source§impl Serialize for LogData
 
impl Serialize for LogData
Source§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,
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.