Struct alloy_primitives::Log
source · pub struct Log {
pub data: Bytes,
/* private fields */
}
Expand description
An Ethereum event log object.
Fields§
§data: Bytes
The plain data.
Implementations§
source§impl Log
impl Log
sourcepub fn new_unchecked(topics: Vec<B256>, data: Bytes) -> Self
pub fn new_unchecked(topics: Vec<B256>, data: Bytes) -> Self
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_mut(&mut self) -> &mut [B256]
pub fn topics_mut(&mut self) -> &mut [B256]
Get the topic list, mutably. This gives access to the internal array, without allowing extension of that array.
sourcepub fn topics_mut_unchecked(&mut self) -> &mut Vec<B256>
pub fn topics_mut_unchecked(&mut self) -> &mut Vec<B256>
Get a mutable reference to the topic list. This allows creation of invalid logs.
sourcepub fn set_topics_unchecked(&mut self, topics: Vec<B256>)
pub fn set_topics_unchecked(&mut self, topics: Vec<B256>)
Set the topic list, without length-checking. This allows creation of invalid logs.
sourcepub fn set_topics_truncating(&mut self, topics: Vec<B256>)
pub fn set_topics_truncating(&mut self, topics: Vec<B256>)
Set the topic list, truncating to 4 topics.
Trait Implementations§
impl Eq for Log
impl StructuralEq for Log
impl StructuralPartialEq for Log
Auto Trait Implementations§
impl RefUnwindSafe for Log
impl Send for Log
impl Sync for Log
impl Unpin for Log
impl UnwindSafe for Log
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