Struct zebra_chain::sapling::shielded_data::ShieldedData
source · pub struct ShieldedData<AnchorV>where
AnchorV: AnchorVariant + Clone,{
pub value_balance: Amount,
pub transfers: TransferData<AnchorV>,
pub binding_sig: Signature<Binding>,
}
Expand description
A bundle of Spend
and Output
descriptions and signature data.
Spend and Output descriptions are optional, but Zcash transactions must
include a binding signature if and only if there is at least one Spend or
Output description. This wrapper type bundles at least one Spend or Output
description with the required signature data, so that an
Option<ShieldedData>
correctly models the presence or absence of any
shielded data.
Differences between Transaction Versions
The Sapling value_balance
field is optional in Transaction::V5
, but
required in Transaction::V4
. In both cases, if there is no ShieldedData
,
then the field value must be zero. Therefore, we only need to store
value_balance
when there is some Sapling ShieldedData
.
In Transaction::V4
, each Spend
has its own anchor. In Transaction::V5
,
there is a single shared_anchor
for the entire transaction, which is only
present when there is at least one spend. These structural differences are
modeled using the AnchorVariant
type trait and TransferData
enum.
Fields§
§value_balance: Amount
The net value of Sapling spend transfers minus output transfers.
Denoted as valueBalanceSapling
in the spec.
transfers: TransferData<AnchorV>
A bundle of spends and outputs, containing at least one spend or output, in the order they appear in the transaction.
In V5 transactions, also contains a shared anchor, if there are any spends.
binding_sig: Signature<Binding>
A signature on the transaction hash.
Denoted as bindingSigSapling
in the spec.
Implementations§
source§impl<AnchorV> ShieldedData<AnchorV>where
AnchorV: AnchorVariant + Clone,
Spend<PerSpendAnchor>: From<(Spend<AnchorV>, AnchorV::Shared)>,
impl<AnchorV> ShieldedData<AnchorV>where AnchorV: AnchorVariant + Clone, Spend<PerSpendAnchor>: From<(Spend<AnchorV>, AnchorV::Shared)>,
sourcepub fn anchors(&self) -> impl Iterator<Item = Root> + '_
pub fn anchors(&self) -> impl Iterator<Item = Root> + '_
Iterate over the Spend
s for this transaction, returning deduplicated
tree::Root
s, regardless of the underlying transaction version.
sourcepub fn spends_per_anchor(
&self
) -> impl Iterator<Item = Spend<PerSpendAnchor>> + '_
pub fn spends_per_anchor( &self ) -> impl Iterator<Item = Spend<PerSpendAnchor>> + '_
Iterate over the Spend
s for this transaction, returning
Spend<PerSpendAnchor>
regardless of the underlying transaction version.
Correctness
Do not use this function for serialization.
source§impl<AnchorV> ShieldedData<AnchorV>where
AnchorV: AnchorVariant + Clone,
impl<AnchorV> ShieldedData<AnchorV>where AnchorV: AnchorVariant + Clone,
sourcepub fn spends(&self) -> impl Iterator<Item = &Spend<AnchorV>>
pub fn spends(&self) -> impl Iterator<Item = &Spend<AnchorV>>
Iterate over the Spend
s for this transaction, returning them as
their generic type.
Correctness
Use this function for serialization.
sourcepub fn outputs(&self) -> impl Iterator<Item = &Output>
pub fn outputs(&self) -> impl Iterator<Item = &Output>
Iterate over the Output
s for this transaction, in the order they
appear in it.
Provide the shared anchor for this transaction, if present.
The shared anchor is only present if:
- there is at least one spend, and
- this is a
V5
transaction.
sourcepub fn nullifiers(&self) -> impl Iterator<Item = &Nullifier>
pub fn nullifiers(&self) -> impl Iterator<Item = &Nullifier>
sourcepub fn note_commitments(&self) -> impl Iterator<Item = &Fq>
pub fn note_commitments(&self) -> impl Iterator<Item = &Fq>
Collect the cm_u’s for this transaction, if it contains Output
s,
in the order they appear in the transaction.
sourcepub fn binding_verification_key(&self) -> VerificationKeyBytes<Binding>
pub fn binding_verification_key(&self) -> VerificationKeyBytes<Binding>
Calculate the Spend/Output binding verification key.
Getting the binding signature validating key from the Spend and Output description value commitments and the balancing value implicitly checks that the balancing value is consistent with the value transferred in the Spend and Output descriptions but also proves that the signer knew the randomness used for the Spend and Output value commitments, which prevents replays of Output descriptions.
The net value of Spend transfers minus Output transfers in a transaction is called the balancing value, measured in zatoshi as a signed integer v_balance.
Consistency of v_balance with the value commitments in Spend descriptions and Output descriptions is enforced by the binding signature.
Instead of generating a key pair at random, we generate it as a function of the value commitments in the Spend descriptions and Output descriptions of the transaction, and the balancing value.
sourcepub fn value_balance(&self) -> Amount<NegativeAllowed>
pub fn value_balance(&self) -> Amount<NegativeAllowed>
Provide access to the value_balance
field of the shielded data.
Needed to calculate the sapling value balance.
Trait Implementations§
source§impl<AnchorV> Arbitrary for ShieldedData<AnchorV>where
AnchorV: AnchorVariant + Clone + Debug + 'static,
TransferData<AnchorV>: Arbitrary,
impl<AnchorV> Arbitrary for ShieldedData<AnchorV>where AnchorV: AnchorVariant + Clone + Debug + 'static, TransferData<AnchorV>: Arbitrary,
§type Parameters = ()
type Parameters = ()
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.source§fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
§type Strategy = BoxedStrategy<ShieldedData<AnchorV>>
type Strategy = BoxedStrategy<ShieldedData<AnchorV>>
Strategy
used to generate values of type Self
.source§impl<AnchorV> Clone for ShieldedData<AnchorV>where
AnchorV: AnchorVariant + Clone + Clone,
impl<AnchorV> Clone for ShieldedData<AnchorV>where AnchorV: AnchorVariant + Clone + Clone,
source§fn clone(&self) -> ShieldedData<AnchorV>
fn clone(&self) -> ShieldedData<AnchorV>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<AnchorV> Debug for ShieldedData<AnchorV>where
AnchorV: AnchorVariant + Clone + Debug,
impl<AnchorV> Debug for ShieldedData<AnchorV>where AnchorV: AnchorVariant + Clone + Debug,
source§impl<'de, AnchorV> Deserialize<'de> for ShieldedData<AnchorV>where
AnchorV: AnchorVariant + Clone + Deserialize<'de>,
impl<'de, AnchorV> Deserialize<'de> for ShieldedData<AnchorV>where AnchorV: AnchorVariant + Clone + Deserialize<'de>,
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>,
source§impl<AnchorV> Display for ShieldedData<AnchorV>where
AnchorV: AnchorVariant + Clone,
impl<AnchorV> Display for ShieldedData<AnchorV>where AnchorV: AnchorVariant + Clone,
source§impl<AnchorV> PartialEq<ShieldedData<AnchorV>> for ShieldedData<AnchorV>where
AnchorV: AnchorVariant + Clone + PartialEq,
impl<AnchorV> PartialEq<ShieldedData<AnchorV>> for ShieldedData<AnchorV>where AnchorV: AnchorVariant + Clone + PartialEq,
source§fn eq(&self, other: &ShieldedData<AnchorV>) -> bool
fn eq(&self, other: &ShieldedData<AnchorV>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<AnchorV> Serialize for ShieldedData<AnchorV>where
AnchorV: AnchorVariant + Clone + Serialize,
impl<AnchorV> Serialize for ShieldedData<AnchorV>where AnchorV: AnchorVariant + Clone + Serialize,
source§fn zcash_serialize_to_vec(&self) -> Result<Vec<u8>, Error>
fn zcash_serialize_to_vec(&self) -> Result<Vec<u8>, Error>
source§fn zcash_serialized_size(&self) -> usize
fn zcash_serialized_size(&self) -> usize
self
by using a fake writer.impl<AnchorV> Eq for ShieldedData<AnchorV>where AnchorV: AnchorVariant + Clone + Eq,
impl<AnchorV> StructuralEq for ShieldedData<AnchorV>where AnchorV: AnchorVariant + Clone,
impl<AnchorV> StructuralPartialEq for ShieldedData<AnchorV>where AnchorV: AnchorVariant + Clone,
Auto Trait Implementations§
impl<AnchorV> RefUnwindSafe for ShieldedData<AnchorV>where <AnchorV as AnchorVariant>::PerSpend: RefUnwindSafe, <AnchorV as AnchorVariant>::Shared: RefUnwindSafe,
impl<AnchorV> Send for ShieldedData<AnchorV>where <AnchorV as AnchorVariant>::PerSpend: Send, <AnchorV as AnchorVariant>::Shared: Send,
impl<AnchorV> Sync for ShieldedData<AnchorV>where <AnchorV as AnchorVariant>::PerSpend: Sync, <AnchorV as AnchorVariant>::Shared: Sync,
impl<AnchorV> Unpin for ShieldedData<AnchorV>where <AnchorV as AnchorVariant>::PerSpend: Unpin, <AnchorV as AnchorVariant>::Shared: Unpin,
impl<AnchorV> UnwindSafe for ShieldedData<AnchorV>where <AnchorV as AnchorVariant>::PerSpend: UnwindSafe, <AnchorV as AnchorVariant>::Shared: UnwindSafe,
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
§impl<T> Conv for T
impl<T> Conv for T
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn 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>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where Color: DynColor,
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where Color: DynColor,
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
§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) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere Self: Borrow<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> Rwhere Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,
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) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere Self: AsMut<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_mut()
into the pipe
function.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<Response, Error> ResponseResult<Response, Error> for Response
impl<Response, Error> ResponseResult<Response, Error> for Response
source§fn into_result(self) -> Result<Response, Error>
fn into_result(self) -> Result<Response, Error>
Result
that can be sent as a response.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,
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)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds.