pub struct LogData {
pub data: Bytes,
/* private fields */
}
Expand description
An Ethereum event log object.
Fields§
§data: Bytes
The 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 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.
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<'arbitrary> Arbitrary<'arbitrary> for LogData
impl<'arbitrary> Arbitrary<'arbitrary> for LogData
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<LogData, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<LogData, Error>
Generate an arbitrary value of
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<LogData, Error>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<LogData, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§impl Arbitrary for LogData
impl Arbitrary for LogData
Source§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
.Source§type Strategy = Map<(<Vec<FixedBytes<32>> as Arbitrary>::Strategy, <Bytes as Arbitrary>::Strategy), fn((Vec<FixedBytes<32>>, Bytes)) -> LogData>
type Strategy = Map<(<Vec<FixedBytes<32>> as Arbitrary>::Strategy, <Bytes as Arbitrary>::Strategy), fn((Vec<FixedBytes<32>>, Bytes)) -> LogData>
The type of
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(
_top: <LogData as Arbitrary>::Parameters,
) -> <LogData as Arbitrary>::Strategy
fn arbitrary_with( _top: <LogData as Arbitrary>::Parameters, ) -> <LogData as Arbitrary>::Strategy
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