Struct component_ethereum::types::web3::H2048
[−]Expand description
Bloom hash type with 256 bytes (2048 bits) size.
Tuple Fields
0: [u8; 256]
Implementations
impl Bloom
impl Bloom
pub const fn repeat_byte(byte: u8) -> Bloom
pub const fn repeat_byte(byte: u8) -> Bloom
Returns a new fixed hash where all bits are set to the given byte.
pub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Extracts a byte slice containing the entire fixed hash.
pub fn as_bytes_mut(&mut self) -> &mut [u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub fn as_bytes_mut(&mut self) -> &mut [u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Extracts a mutable byte slice containing the entire fixed hash.
pub const fn as_fixed_bytes(&self) -> &[u8; 256]
pub const fn as_fixed_bytes(&self) -> &[u8; 256]
Extracts a reference to the byte array containing the entire fixed hash.
pub fn as_fixed_bytes_mut(&mut self) -> &mut [u8; 256]
pub fn as_fixed_bytes_mut(&mut self) -> &mut [u8; 256]
Extracts a reference to the byte array containing the entire fixed hash.
pub const fn to_fixed_bytes(self) -> [u8; 256]
pub const fn to_fixed_bytes(self) -> [u8; 256]
Returns the inner bytes array.
pub fn as_mut_ptr(&mut self) -> *mut u8
pub fn as_mut_ptr(&mut self) -> *mut u8
Returns a mutable raw pointer to the value.
pub fn assign_from_slice(&mut self, src: &[u8])
pub fn assign_from_slice(&mut self, src: &[u8])
pub fn from_slice(src: &[u8]) -> Bloom
pub fn from_slice(src: &[u8]) -> Bloom
impl Bloom
impl Bloom
Utilities using the byteorder
crate.
pub fn to_low_u64_be(&self) -> u64
pub fn to_low_u64_be(&self) -> u64
Returns the lowest 8 bytes interpreted as big-endian.
Note
For hash type with less than 8 bytes the missing bytes are interpreted as being zero.
pub fn to_low_u64_le(&self) -> u64
pub fn to_low_u64_le(&self) -> u64
Returns the lowest 8 bytes interpreted as little-endian.
Note
For hash type with less than 8 bytes the missing bytes are interpreted as being zero.
pub fn to_low_u64_ne(&self) -> u64
pub fn to_low_u64_ne(&self) -> u64
Returns the lowest 8 bytes interpreted as native-endian.
Note
For hash type with less than 8 bytes the missing bytes are interpreted as being zero.
pub fn from_low_u64_be(val: u64) -> Bloom
pub fn from_low_u64_be(val: u64) -> Bloom
Creates a new hash type from the given u64
value.
Note
- The given
u64
value is interpreted as big endian. - Ignores the most significant bits of the given value if the hash type has less than 8 bytes.
pub fn from_low_u64_le(val: u64) -> Bloom
pub fn from_low_u64_le(val: u64) -> Bloom
Creates a new hash type from the given u64
value.
Note
- The given
u64
value is interpreted as little endian. - Ignores the most significant bits of the given value if the hash type has less than 8 bytes.
pub fn from_low_u64_ne(val: u64) -> Bloom
pub fn from_low_u64_ne(val: u64) -> Bloom
Creates a new hash type from the given u64
value.
Note
- The given
u64
value is interpreted as native endian. - Ignores the most significant bits of the given value if the hash type has less than 8 bytes.
impl Bloom
impl Bloom
Utilities using the rand
crate.
pub fn randomize_using<R>(&mut self, rng: &mut R) where
R: Rng + ?Sized,
pub fn randomize_using<R>(&mut self, rng: &mut R) where
R: Rng + ?Sized,
Assign self
to a cryptographically random value using the
given random number generator.
pub fn randomize(&mut self)
pub fn randomize(&mut self)
Assign self
to a cryptographically random value.
pub fn random_using<R>(rng: &mut R) -> Bloom where
R: Rng + ?Sized,
pub fn random_using<R>(rng: &mut R) -> Bloom where
R: Rng + ?Sized,
Create a new hash with cryptographically random content using the given random number generator.
impl Bloom
impl Bloom
pub fn is_empty(&self) -> bool
pub fn contains_input(&self, input: Input<'_>) -> bool
pub fn contains_bloom<'a, B>(&self, bloom: B) -> bool where
BloomRef<'a>: From<B>,
pub fn accrue(&mut self, input: Input<'_>)
pub fn accrue_bloom<'a, B>(&mut self, bloom: B) where
BloomRef<'a>: From<B>,
pub fn data(&self) -> &[u8; 256]
Trait Implementations
impl<'r> BitAndAssign<&'r Bloom> for Bloom
impl<'r> BitAndAssign<&'r Bloom> for Bloom
fn bitand_assign(&mut self, rhs: &'r Bloom)
fn bitand_assign(&mut self, rhs: &'r Bloom)
Performs the &=
operation. Read more
impl BitAndAssign<Bloom> for Bloom
impl BitAndAssign<Bloom> for Bloom
fn bitand_assign(&mut self, rhs: Bloom)
fn bitand_assign(&mut self, rhs: Bloom)
Performs the &=
operation. Read more
impl<'r> BitOrAssign<&'r Bloom> for Bloom
impl<'r> BitOrAssign<&'r Bloom> for Bloom
fn bitor_assign(&mut self, rhs: &'r Bloom)
fn bitor_assign(&mut self, rhs: &'r Bloom)
Performs the |=
operation. Read more
impl BitOrAssign<Bloom> for Bloom
impl BitOrAssign<Bloom> for Bloom
fn bitor_assign(&mut self, rhs: Bloom)
fn bitor_assign(&mut self, rhs: Bloom)
Performs the |=
operation. Read more
impl<'r> BitXorAssign<&'r Bloom> for Bloom
impl<'r> BitXorAssign<&'r Bloom> for Bloom
fn bitxor_assign(&mut self, rhs: &'r Bloom)
fn bitxor_assign(&mut self, rhs: &'r Bloom)
Performs the ^=
operation. Read more
impl BitXorAssign<Bloom> for Bloom
impl BitXorAssign<Bloom> for Bloom
fn bitxor_assign(&mut self, rhs: Bloom)
fn bitxor_assign(&mut self, rhs: Bloom)
Performs the ^=
operation. Read more
impl Decodable for Bloom
impl Decodable for Bloom
impl<'de> Deserialize<'de> for Bloom
impl<'de> Deserialize<'de> for Bloom
fn deserialize<D>(
deserializer: D
) -> Result<Bloom, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Bloom, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Encodable for Bloom
impl Encodable for Bloom
fn rlp_append(&self, s: &mut RlpStream)
fn rlp_append(&self, s: &mut RlpStream)
Append a value to the stream
fn rlp_bytes(&self) -> BytesMut
fn rlp_bytes(&self) -> BytesMut
Get rlp-encoded bytes for this instance
impl FromStr for Bloom
impl FromStr for Bloom
impl<I> Index<I> for Bloom where
I: SliceIndex<[u8]>,
impl<I> Index<I> for Bloom where
I: SliceIndex<[u8]>,
type Output = <I as SliceIndex<[u8]>>::Output
type Output = <I as SliceIndex<[u8]>>::Output
The returned type after indexing.
fn index(&self, index: I) -> &<I as SliceIndex<[u8]>>::Output
fn index(&self, index: I) -> &<I as SliceIndex<[u8]>>::Output
Performs the indexing (container[index]
) operation. Read more
impl<I> IndexMut<I> for Bloom where
I: SliceIndex<[u8], Output = [u8]>,
impl<I> IndexMut<I> for Bloom where
I: SliceIndex<[u8], Output = [u8]>,
fn index_mut(&mut self, index: I) -> &mut <I as SliceIndex<[u8]>>::Output
fn index_mut(&mut self, index: I) -> &mut <I as SliceIndex<[u8]>>::Output
Performs the mutable indexing (container[index]
) operation. Read more
impl Ord for Bloom
impl Ord for Bloom
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
impl PartialOrd<Bloom> for Bloom
impl PartialOrd<Bloom> for Bloom
fn partial_cmp(&self, other: &Bloom) -> Option<Ordering>
fn partial_cmp(&self, other: &Bloom) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Serialize for Bloom
impl Serialize for Bloom
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 Copy for Bloom
impl Eq for Bloom
Auto Trait Implementations
impl RefUnwindSafe for Bloom
impl Send for Bloom
impl Sync for Bloom
impl Unpin for Bloom
impl UnwindSafe for Bloom
Blanket Implementations
impl<U> AsMutSliceOf for U where
U: AsMut<[u8]> + ?Sized,
impl<U> AsMutSliceOf for U where
U: AsMut<[u8]> + ?Sized,
fn as_mut_slice_of<T>(&mut self) -> Result<&mut [T], Error> where
T: FromByteSlice,
impl<U> AsSliceOf for U where
U: AsRef<[u8]> + ?Sized,
impl<U> AsSliceOf for U where
U: AsRef<[u8]> + ?Sized,
fn as_slice_of<T>(&self) -> Result<&[T], Error> where
T: FromByteSlice,
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<D> OwoColorize for D
impl<D> OwoColorize for D
fn fg<C>(&'a self) -> FgColorDisplay<'a, C, Self> where
C: Color,
fn fg<C>(&'a self) -> FgColorDisplay<'a, C, Self> where
C: Color,
Set the foreground color generically Read more
fn bg<C>(&'a self) -> BgColorDisplay<'a, C, Self> where
C: Color,
fn bg<C>(&'a self) -> BgColorDisplay<'a, C, Self> where
C: Color,
Set the background color generically. Read more
fn black(&'a self) -> FgColorDisplay<'a, Black, Self>
fn black(&'a self) -> FgColorDisplay<'a, Black, Self>
Change the foreground color to black
fn on_black(&'a self) -> BgColorDisplay<'a, Black, Self>
fn on_black(&'a self) -> BgColorDisplay<'a, Black, Self>
Change the foreground color to black
fn red(&'a self) -> FgColorDisplay<'a, Red, Self>
fn red(&'a self) -> FgColorDisplay<'a, Red, Self>
Change the foreground color to red
fn on_red(&'a self) -> BgColorDisplay<'a, Red, Self>
fn on_red(&'a self) -> BgColorDisplay<'a, Red, Self>
Change the foreground color to red
fn green(&'a self) -> FgColorDisplay<'a, Green, Self>
fn green(&'a self) -> FgColorDisplay<'a, Green, Self>
Change the foreground color to green
fn on_green(&'a self) -> BgColorDisplay<'a, Green, Self>
fn on_green(&'a self) -> BgColorDisplay<'a, Green, Self>
Change the foreground color to green
fn yellow(&'a self) -> FgColorDisplay<'a, Yellow, Self>
fn yellow(&'a self) -> FgColorDisplay<'a, Yellow, Self>
Change the foreground color to yellow
fn on_yellow(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow(&'a self) -> BgColorDisplay<'a, Yellow, Self>
Change the foreground color to yellow
fn blue(&'a self) -> FgColorDisplay<'a, Blue, Self>
fn blue(&'a self) -> FgColorDisplay<'a, Blue, Self>
Change the foreground color to blue
fn on_blue(&'a self) -> BgColorDisplay<'a, Blue, Self>
fn on_blue(&'a self) -> BgColorDisplay<'a, Blue, Self>
Change the foreground color to blue
fn magenta(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Change the foreground color to magenta
fn on_magenta(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Change the foreground color to magenta
fn purple(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn purple(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Change the foreground color to purple
fn on_purple(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Change the foreground color to purple
fn cyan(&'a self) -> FgColorDisplay<'a, Cyan, Self>
fn cyan(&'a self) -> FgColorDisplay<'a, Cyan, Self>
Change the foreground color to cyan
fn on_cyan(&'a self) -> BgColorDisplay<'a, Cyan, Self>
fn on_cyan(&'a self) -> BgColorDisplay<'a, Cyan, Self>
Change the foreground color to cyan
fn white(&'a self) -> FgColorDisplay<'a, White, Self>
fn white(&'a self) -> FgColorDisplay<'a, White, Self>
Change the foreground color to white
fn on_white(&'a self) -> BgColorDisplay<'a, White, Self>
fn on_white(&'a self) -> BgColorDisplay<'a, White, Self>
Change the foreground color to white
fn bright_black(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
Change the foreground color to bright black
fn on_bright_black(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
Change the foreground color to bright black
fn bright_red(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
Change the foreground color to bright red
fn on_bright_red(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
Change the foreground color to bright red
fn bright_green(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
Change the foreground color to bright green
fn on_bright_green(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
Change the foreground color to bright green
fn bright_yellow(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
Change the foreground color to bright yellow
fn on_bright_yellow(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
Change the foreground color to bright yellow
fn bright_blue(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
Change the foreground color to bright blue
fn on_bright_blue(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
Change the foreground color to bright blue
fn bright_magenta(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Change the foreground color to bright magenta
fn on_bright_magenta(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Change the foreground color to bright magenta
fn bright_purple(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Change the foreground color to bright purple
fn on_bright_purple(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Change the foreground color to bright purple
fn bright_cyan(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
Change the foreground color to bright cyan
fn on_bright_cyan(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
Change the foreground color to bright cyan
fn bright_white(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
Change the foreground color to bright white
fn on_bright_white(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
Change the foreground color to bright white
fn bold(&'a self) -> BoldDisplay<'a, Self>
fn bold(&'a self) -> BoldDisplay<'a, Self>
Make the text bold
fn dimmed(&'a self) -> DimDisplay<'a, Self>
fn dimmed(&'a self) -> DimDisplay<'a, Self>
Make the text dim
fn italic(&'a self) -> ItalicDisplay<'a, Self>
fn italic(&'a self) -> ItalicDisplay<'a, Self>
Make the text italicized
fn underline(&'a self) -> UnderlineDisplay<'a, Self>
fn underline(&'a self) -> UnderlineDisplay<'a, Self>
Make the text italicized
fn blink(&'a self) -> BlinkDisplay<'a, Self>
fn blink(&'a self) -> BlinkDisplay<'a, Self>
Make the text blink
fn blink_fast(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast(&'a self) -> BlinkFastDisplay<'a, Self>
Make the text blink (but fast!)
fn reversed(&'a self) -> ReversedDisplay<'a, Self>
fn reversed(&'a self) -> ReversedDisplay<'a, Self>
Swap the foreground and background colors
Hide the text
fn strikethrough(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough(&'a self) -> StrikeThroughDisplay<'a, Self>
Cross out the text
fn color<Color>(&'a self, color: Color) -> FgDynColorDisplay<'a, Color, Self> where
Color: DynColor,
fn color<Color>(&'a self, color: Color) -> FgDynColorDisplay<'a, Color, Self> where
Color: DynColor,
Set the foreground color at runtime. Only use if you do not know which color will be used at
compile-time. If the color is constant, use either OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more
fn on_color<Color>(&'a self, color: Color) -> BgDynColorDisplay<'a, Color, Self> where
Color: DynColor,
fn on_color<Color>(&'a self, color: Color) -> BgDynColorDisplay<'a, Color, Self> where
Color: DynColor,
Set the background color at runtime. Only use if you do not know what color to use at
compile-time. If the color is constant, use either OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more
fn truecolor(&'a self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'a, Rgb, Self>
fn truecolor(&'a self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'a, Rgb, Self>
Sets the foreground color to an RGB value.
fn on_truecolor(&'a self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'a, Rgb, Self>
fn on_truecolor(&'a self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'a, Rgb, Self>
Sets the background color to an RGB value.
sourceimpl<T> SectionExt for T where
T: 'static + Display + Send + Sync,
impl<T> SectionExt for T where
T: 'static + Display + Send + Sync,
sourceimpl<T> ToHex for T where
T: AsRef<[u8]>,
impl<T> ToHex for T where
T: AsRef<[u8]>,
sourcefn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self
into the result. Lower case
letters are used (e.g. f9b4ca
) Read more
sourcefn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self
into the result. Upper case
letters are used (e.g. F9B4CA
) Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more