Struct alloy_primitives::Log
source · pub struct Log {
pub data: Bytes,
/* private fields */
}Expand description
An Ethereum event log object.
Fields§
§data: BytesThe 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§
source§impl<'arbitrary> Arbitrary<'arbitrary> for Log
impl<'arbitrary> Arbitrary<'arbitrary> for Log
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moresource§impl Arbitrary for Log
impl Arbitrary for Log
§type Parameters = (<Vec<FixedBytes<32>> as Arbitrary>::Parameters, <Bytes as Arbitrary>::Parameters)
type Parameters = (<Vec<FixedBytes<32>> as Arbitrary>::Parameters, <Bytes as Arbitrary>::Parameters)
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.§type Strategy = Map<(<Vec<FixedBytes<32>> as Arbitrary>::Strategy, <Bytes as Arbitrary>::Strategy), fn(_: (Vec<FixedBytes<32>>, Bytes)) -> Log>
type Strategy = Map<(<Vec<FixedBytes<32>> as Arbitrary>::Strategy, <Bytes as Arbitrary>::Strategy), fn(_: (Vec<FixedBytes<32>>, Bytes)) -> Log>
The type of
Strategy used to generate values of type Self.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl<'de> Deserialize<'de> for Log
impl<'de> Deserialize<'de> for Log
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
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