Struct Nibbles
pub struct Nibbles { /* private fields */ }Expand description
Structure representing a sequence of nibbles.
A nibble is a 4-bit value, and this structure is used to store the nibble sequence representing the keys in a Merkle Patricia Trie (MPT). Using nibbles simplifies trie operations and enables consistent key representation in the MPT.
§Internal representation
The internal representation is currently a [U256] that stores two nibbles per byte. Nibbles
are stored inline (on the stack), and can be up to a length of 64 nibbles, or 32 unpacked bytes.
Additionally, a separate length field is stored to track the actual length of the nibble
sequence. When the [U256] is modified directly, the length field must be updated
accordingly. Otherwise, the behavior is undefined.
Nibbles are stored with most significant bits set first, meaning that a nibble sequence 0x101
will be stored as 0x101...0, and not 0x0...101.
§Examples
use nybbles::Nibbles;
let bytes = [0xAB, 0xCD];
let nibbles = Nibbles::unpack(&bytes);
assert_eq!(nibbles, Nibbles::from_nibbles(&[0x0A, 0x0B, 0x0C, 0x0D]));
assert_eq!(nibbles.to_vec(), vec![0x0A, 0x0B, 0x0C, 0x0D]);
let packed = nibbles.pack();
assert_eq!(&packed[..], &bytes[..]);Implementations§
§impl Nibbles
impl Nibbles
pub fn from_iter_unchecked<I>(iter: I) -> Nibbleswhere
I: IntoIterator<Item = u8>,
pub fn from_iter_unchecked<I>(iter: I) -> Nibbleswhere
I: IntoIterator<Item = u8>,
Creates a new Nibbles instance from the given iterator over nibbles, without checking
their validity.
Note that only the low nibble of every byte will be stored as a nibble, i.e. for 0x12 we
will store a nibble 2.
For checked version, use the FromIterator implementation.
§Examples
let nibbles = Nibbles::from_iter_unchecked([0x0A, 0x0B, 0x0C, 0x0D]);
assert_eq!(nibbles.to_vec(), vec![0x0A, 0x0B, 0x0C, 0x0D]);pub fn from_nibbles<T>(nibbles: T) -> Nibbles
pub fn from_nibbles<T>(nibbles: T) -> Nibbles
Creates a new Nibbles instance from the given nibbles.
§Panics
Panics if the any of the bytes is not a valid nibble (0..=0x0f).
§Examples
let nibbles = Nibbles::from_nibbles(&[0x0A, 0x0B, 0x0C, 0x0D]);
assert_eq!(nibbles.to_vec(), vec![0x0A, 0x0B, 0x0C, 0x0D]);Invalid values will cause panics:
let nibbles = Nibbles::from_nibbles(&[0xFF]);pub fn from_nibbles_unchecked<T>(nibbles: T) -> Nibbles
pub fn from_nibbles_unchecked<T>(nibbles: T) -> Nibbles
Creates a new Nibbles instance from the given nibbles.
Note that only the low nibble of every byte will be stored as a nibble, i.e. for 0x12 we
will store a nibble 2.
For checked version, use Nibbles::from_nibbles.
§Examples
let nibbles = Nibbles::from_nibbles_unchecked(&[0x0A, 0x0B, 0x0C, 0x0D]);
assert_eq!(nibbles.to_vec(), vec![0x0A, 0x0B, 0x0C, 0x0D]);Invalid values will not cause panics:
let nibbles = Nibbles::from_nibbles_unchecked(&[0xFF]);
assert_eq!(nibbles.to_vec(), vec![0x0F]);pub fn unpack(data: impl AsRef<[u8]>) -> Nibbles
pub fn unpack(data: impl AsRef<[u8]>) -> Nibbles
Converts a byte slice into a Nibbles instance containing the nibbles (half-bytes or 4
bits) that make up the input byte data.
§Panics
Panics if the length of the input is greater than 32 bytes.
§Examples
let nibbles = Nibbles::unpack(&[0xAB, 0xCD]);
assert_eq!(nibbles.to_vec(), vec![0x0A, 0x0B, 0x0C, 0x0D]);let nibbles = Nibbles::unpack(&[0xAB; 33]);pub unsafe fn unpack_unchecked(data: &[u8]) -> Nibbles
pub unsafe fn unpack_unchecked(data: &[u8]) -> Nibbles
Converts a byte slice into a Nibbles instance containing the nibbles (half-bytes or 4
bits) that make up the input byte data.
§Safety
The caller must ensure that the length of the input is less than or equal to the size of U256, which is 32 bytes.
§Examples
// SAFETY: the length of the input is less than 32 bytes.
let nibbles = unsafe { Nibbles::unpack_unchecked(&[0xAB, 0xCD]) };
assert_eq!(nibbles.to_vec(), vec![0x0A, 0x0B, 0x0C, 0x0D]);pub fn pack(&self) -> SmallVec<[u8; 32]>
pub fn pack(&self) -> SmallVec<[u8; 32]>
Packs the nibbles into the given slice.
This method combines each pair of consecutive nibbles into a single byte, effectively reducing the size of the data by a factor of two.
If the number of nibbles is odd, the last nibble is shifted left by 4 bits and added to the packed byte vector.
§Examples
let nibbles = Nibbles::from_nibbles(&[0x0A, 0x0B, 0x0C]);
assert_eq!(nibbles.pack()[..], [0xAB, 0xC0]);pub fn pack_to(&self, out: &mut [u8])
pub fn pack_to(&self, out: &mut [u8])
Packs the nibbles into the given slice.
See pack for more information.
§Panics
Panics if the slice is not at least (self.len() + 1) / 2 bytes long.
§Examples
let nibbles = Nibbles::from_nibbles(&[0x0A, 0x0B, 0x0C]);
let mut packed = [0; 2];
nibbles.pack_to(&mut packed);
assert_eq!(packed[..], [0xAB, 0xC0]);pub unsafe fn pack_to_unchecked(&self, ptr: *mut u8)
pub unsafe fn pack_to_unchecked(&self, ptr: *mut u8)
Packs the nibbles into the given pointer.
See pack for more information.
§Safety
ptr must be valid for at least (self.len() + 1) / 2 bytes.
§Examples
let nibbles = Nibbles::from_nibbles(&[0x0A, 0x0B, 0x0C, 0x0D]);
let mut packed = [0; 2];
// SAFETY: enough capacity.
unsafe { nibbles.pack_to_unchecked(packed.as_mut_ptr()) };
assert_eq!(packed[..], [0xAB, 0xCD]);pub unsafe fn pack_to_slice_unchecked(&self, out: &mut [MaybeUninit<u8>])
pub unsafe fn pack_to_slice_unchecked(&self, out: &mut [MaybeUninit<u8>])
pub fn to_vec(&self) -> Vec<u8> ⓘ
pub fn to_vec(&self) -> Vec<u8> ⓘ
Converts the nibbles into a vector of nibbles.
§Examples
let nibbles = Nibbles::from_nibbles(&[0x0A, 0x0B, 0x0C, 0x0D]);
assert_eq!(nibbles.to_vec(), vec![0x0A, 0x0B, 0x0C, 0x0D]);pub const fn iter(&self) -> NibblesIter<'_>
pub const fn iter(&self) -> NibblesIter<'_>
Returns an iterator over the nibbles.
§Examples
let nibbles = Nibbles::from_nibbles(&[0x0A, 0x0B, 0x0C, 0x0D]);
let collected: Vec<u8> = nibbles.iter().collect();
assert_eq!(collected, vec![0x0A, 0x0B, 0x0C, 0x0D]);pub fn get_byte(&self, i: usize) -> Option<u8>
pub fn get_byte(&self, i: usize) -> Option<u8>
Gets the byte at the given index by combining two consecutive nibbles.
§Examples
let nibbles = Nibbles::from_nibbles(&[0x0A, 0x0B, 0x0C, 0x0D]);
assert_eq!(nibbles.get_byte(0), Some(0xAB));
assert_eq!(nibbles.get_byte(1), Some(0xBC));
assert_eq!(nibbles.get_byte(2), Some(0xCD));
assert_eq!(nibbles.get_byte(3), None);pub fn get_byte_unchecked(&self, i: usize) -> u8
pub fn get_byte_unchecked(&self, i: usize) -> u8
Gets the byte at the given index by combining two consecutive nibbles.
§Panics
Panics if i..i + 1 is out of bounds.
§Examples
let nibbles = Nibbles::from_nibbles(&[0x0A, 0x0B, 0x0C, 0x0D]);
// SAFETY: in range.
unsafe {
assert_eq!(nibbles.get_byte_unchecked(0), 0xAB);
assert_eq!(nibbles.get_byte_unchecked(1), 0xBC);
assert_eq!(nibbles.get_byte_unchecked(2), 0xCD);
}pub fn is_leaf(&self) -> bool
pub fn is_leaf(&self) -> bool
The last element of the hex vector is used to determine whether the nibble sequence represents a leaf or an extension node. If the last element is 0x10 (16), then it’s a leaf.
pub fn starts_with(&self, other: &Nibbles) -> bool
pub fn starts_with(&self, other: &Nibbles) -> bool
Returns true if this nibble sequence starts with the given prefix.
pub fn ends_with(&self, other: &Nibbles) -> bool
pub fn ends_with(&self, other: &Nibbles) -> bool
Returns true if this nibble sequence ends with the given suffix.
pub fn get_unchecked(&self, i: usize) -> u8
pub fn get_unchecked(&self, i: usize) -> u8
pub fn set_at(&mut self, i: usize, value: u8)
pub fn set_at(&mut self, i: usize, value: u8)
Sets the nibble at the given index.
§Panics
Panics if the index is out of bounds, or if value is not a valid nibble (0..=0x0f).
pub unsafe fn set_at_unchecked(&mut self, i: usize, value: u8)
pub unsafe fn set_at_unchecked(&mut self, i: usize, value: u8)
Sets the nibble at the given index, without checking its validity.
§Safety
The caller must ensure that the index is within bounds.
pub fn common_prefix_length(&self, other: &Nibbles) -> usize
pub fn common_prefix_length(&self, other: &Nibbles) -> usize
Returns the length of the common prefix between this nibble sequence and the given.
§Examples
let a = Nibbles::from_nibbles(&[0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F]);
let b = Nibbles::from_nibbles(&[0x0A, 0x0B, 0x0C, 0x0E]);
assert_eq!(a.common_prefix_length(&b), 3);pub const fn as_mut_uint_unchecked(&mut self) -> &mut Uint<256, 4>
pub const fn as_mut_uint_unchecked(&mut self) -> &mut Uint<256, 4>
Returns a mutable reference to the underlying [U256].
Note that it is possible to create invalid Nibbles instances using this method. See
the type docs for more details.
pub fn slice_unchecked(&self, start: usize, end: usize) -> Nibbles
pub fn slice_unchecked(&self, start: usize, end: usize) -> Nibbles
Creates new nibbles containing the nibbles in the specified range [start, end)
without checking bounds.
§Safety
This method does not verify that the provided range is valid for this nibble sequence.
The caller must ensure that start <= end and end <= self.len().
pub fn slice(&self, range: impl RangeBounds<usize>) -> Nibbles
pub fn slice(&self, range: impl RangeBounds<usize>) -> Nibbles
Creates new nibbles containing the nibbles in the specified range.
§Panics
This method will panic if the range is out of bounds for this nibble sequence.
pub fn push(&mut self, nibble: u8)
pub fn push(&mut self, nibble: u8)
Pushes a nibble to the end of the current nibbles.
§Panics
Panics if the nibble is not a valid nibble (0..=0x0f).
pub const fn push_unchecked(&mut self, nibble: u8)
pub const fn push_unchecked(&mut self, nibble: u8)
Pushes a nibble to the end of the current nibbles without checking its validity.
Note that only the low nibble of the byte is used. For example, for byte 0x12, only the
nibble 0x2 is pushed.
pub fn extend_from_slice(&mut self, other: &[u8])
pub fn extend_from_slice(&mut self, other: &[u8])
Extend the current nibbles with another byte slice.
pub fn extend_from_slice_unchecked(&mut self, other: &[u8])
pub fn extend_from_slice_unchecked(&mut self, other: &[u8])
pub const fn clear(&mut self)
pub const fn clear(&mut self)
Clears the current nibbles.
Trait Implementations§
§impl<'a> Arbitrary<'a> for Nibbles
impl<'a> Arbitrary<'a> for Nibbles
§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Nibbles, Error>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Nibbles, Error>
Self from the given unstructured data. Read more§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read more§impl Arbitrary for Nibbles
impl Arbitrary for Nibbles
§type Parameters = SizeRange
type Parameters = SizeRange
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.§type Strategy = Map<VecStrategy<RangeInclusive<u8>>, fn(Vec<u8>) -> Nibbles>
type Strategy = Map<VecStrategy<RangeInclusive<u8>>, fn(Vec<u8>) -> Nibbles>
Strategy used to generate values of type Self.§fn arbitrary_with(size: SizeRange) -> <Nibbles as Arbitrary>::Strategy
fn arbitrary_with(size: SizeRange) -> <Nibbles as Arbitrary>::Strategy
§impl<'de> Deserialize<'de> for Nibbles
impl<'de> Deserialize<'de> for Nibbles
§fn deserialize<D>(
deserializer: D,
) -> Result<Nibbles, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Nibbles, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl From<Nibbles> for StoredNibbles
impl From<Nibbles> for StoredNibbles
Source§impl From<Nibbles> for StoredNibblesSubKey
impl From<Nibbles> for StoredNibblesSubKey
Source§impl From<StoredNibblesSubKey> for Nibbles
impl From<StoredNibblesSubKey> for Nibbles
Source§fn from(value: StoredNibblesSubKey) -> Self
fn from(value: StoredNibblesSubKey) -> Self
§impl FromIterator<Nibbles> for DecodedProofRetainer
impl FromIterator<Nibbles> for DecodedProofRetainer
§fn from_iter<T>(iter: T) -> DecodedProofRetainerwhere
T: IntoIterator<Item = Nibbles>,
fn from_iter<T>(iter: T) -> DecodedProofRetainerwhere
T: IntoIterator<Item = Nibbles>,
§impl FromIterator<Nibbles> for ProofRetainer
impl FromIterator<Nibbles> for ProofRetainer
§fn from_iter<T>(iter: T) -> ProofRetainerwhere
T: IntoIterator<Item = Nibbles>,
fn from_iter<T>(iter: T) -> ProofRetainerwhere
T: IntoIterator<Item = Nibbles>,
§impl FromIterator<u8> for Nibbles
impl FromIterator<u8> for Nibbles
§impl Ord for Nibbles
impl Ord for Nibbles
§impl PartialOrd for Nibbles
impl PartialOrd for Nibbles
§impl Serialize for Nibbles
impl Serialize for Nibbles
§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,
impl Copy for Nibbles
impl Eq for Nibbles
impl StructuralPartialEq for Nibbles
Auto Trait Implementations§
impl Freeze for Nibbles
impl RefUnwindSafe for Nibbles
impl Send for Nibbles
impl Sync for Nibbles
impl Unpin for Nibbles
impl UnwindSafe for Nibbles
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn 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>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<A> ArbInterop for A
impl<'de, T> BorrowedRpcObject<'de> for Twhere
T: RpcBorrow<'de> + RpcSend,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> MaybeDebug for Twhere
T: Debug,
impl<T> MaybeSerde for Twhere
T: Serialize + for<'de> Deserialize<'de>,
impl<'de, T> RpcBorrow<'de> for T
impl<T> RpcObject for Twhere
T: RpcSend + RpcRecv,
impl<T> RpcRecv for T
impl<T> RpcSend for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 40 bytes