pub enum NetworkUpgrade {
Genesis,
BeforeOverwinter,
Overwinter,
Sapling,
Blossom,
Heartwood,
Canopy,
Nu5,
}
Expand description
A Zcash network upgrade.
Network upgrades can change the Zcash network protocol or consensus rules in incompatible ways.
Variants§
Genesis
The Zcash protocol for a Genesis block.
Zcash genesis blocks use a different set of consensus rules from other BeforeOverwinter blocks, so we treat them like a separate network upgrade.
BeforeOverwinter
The Zcash protocol before the Overwinter upgrade.
We avoid using Sprout
, because the specification says that Sprout
is the name of the pre-Sapling protocol, before and after Overwinter.
Overwinter
The Zcash protocol after the Overwinter upgrade.
Sapling
The Zcash protocol after the Sapling upgrade.
Blossom
The Zcash protocol after the Blossom upgrade.
Heartwood
The Zcash protocol after the Heartwood upgrade.
Canopy
The Zcash protocol after the Canopy upgrade.
Nu5
The Zcash protocol after the Nu5 upgrade.
Note: Network Upgrade 5 includes the Orchard Shielded Protocol, non-malleable transaction IDs, and other changes. There is no special code name for Nu5.
Implementations§
source§impl NetworkUpgrade
impl NetworkUpgrade
sourcepub fn activation_list(network: Network) -> BTreeMap<Height, NetworkUpgrade>
pub fn activation_list(network: Network) -> BTreeMap<Height, NetworkUpgrade>
Returns a map between activation heights and network upgrades for network
,
in ascending height order.
If the activation height of a future upgrade is not known, that network upgrade does not appear in the list.
This is actually a bijective map.
When the environment variable TEST_FAKE_ACTIVATION_HEIGHTS is set and it’s a test build, this returns a list of fake activation heights used by some tests.
sourcepub fn current(network: Network, height: Height) -> NetworkUpgrade
pub fn current(network: Network, height: Height) -> NetworkUpgrade
Returns the current network upgrade for network
and height
.
sourcepub fn next(network: Network, height: Height) -> Option<NetworkUpgrade>
pub fn next(network: Network, height: Height) -> Option<NetworkUpgrade>
Returns the next network upgrade for network
and height
.
Returns None if the next upgrade has not been implemented in Zebra yet.
sourcepub fn activation_height(&self, network: Network) -> Option<Height>
pub fn activation_height(&self, network: Network) -> Option<Height>
Returns the activation height for this network upgrade on network
.
Returns None if this network upgrade is a future upgrade, and its activation height has not been set yet.
sourcepub fn is_activation_height(network: Network, height: Height) -> bool
pub fn is_activation_height(network: Network, height: Height) -> bool
Returns true
if height
is the activation height of any network upgrade
on network
.
Use NetworkUpgrade::activation_height
to get the specific network
upgrade.
sourcepub(crate) fn branch_id_list() -> HashMap<NetworkUpgrade, ConsensusBranchId>
pub(crate) fn branch_id_list() -> HashMap<NetworkUpgrade, ConsensusBranchId>
Returns an unordered mapping between NetworkUpgrades and their ConsensusBranchIds.
Branch ids are the same for mainnet and testnet.
If network upgrade does not have a branch id, that network upgrade does not appear in the list.
This is actually a bijective map.
sourcepub fn branch_id(&self) -> Option<ConsensusBranchId>
pub fn branch_id(&self) -> Option<ConsensusBranchId>
Returns the consensus branch id for this network upgrade.
Returns None if this network upgrade has no consensus branch id.
sourcepub fn target_spacing(&self) -> Duration
pub fn target_spacing(&self) -> Duration
Returns the target block spacing for the network upgrade.
Based on PRE_BLOSSOM_POW_TARGET_SPACING
and
POST_BLOSSOM_POW_TARGET_SPACING
from the Zcash specification.
sourcepub fn target_spacing_for_height(network: Network, height: Height) -> Duration
pub fn target_spacing_for_height(network: Network, height: Height) -> Duration
Returns the target block spacing for network
and height
.
See NetworkUpgrade::target_spacing
for details.
sourcepub fn target_spacings(
network: Network
) -> impl Iterator<Item = (Height, Duration)>
pub fn target_spacings( network: Network ) -> impl Iterator<Item = (Height, Duration)>
Returns all the target block spacings for network
and the heights where they start.
sourcepub fn minimum_difficulty_spacing_for_height(
network: Network,
height: Height
) -> Option<Duration>
pub fn minimum_difficulty_spacing_for_height( network: Network, height: Height ) -> Option<Duration>
Returns the minimum difficulty block spacing for network
and height
.
Returns None
if the testnet minimum difficulty consensus rule is not active.
Based on https://zips.z.cash/zip-0208#minimum-difficulty-blocks-on-the-test-network
sourcepub fn is_testnet_min_difficulty_block(
network: Network,
block_height: Height,
block_time: DateTime<Utc>,
previous_block_time: DateTime<Utc>
) -> bool
pub fn is_testnet_min_difficulty_block( network: Network, block_height: Height, block_time: DateTime<Utc>, previous_block_time: DateTime<Utc> ) -> bool
Returns true if the gap between block_time
and previous_block_time
is
greater than the Testnet minimum difficulty time gap. This time gap
depends on the network
and block_height
.
Returns false on Mainnet, when block_height
is less than the minimum
difficulty start height, and when the time gap is too small.
block_time
can be less than, equal to, or greater than
previous_block_time
, because block times are provided by miners.
Implements the Testnet minimum difficulty adjustment from ZIPs 205 and 208.
Spec Note: Some parts of ZIPs 205 and 208 previously specified an incorrect check for the time gap. This function implements the correct “greater than” check.
sourcepub fn averaging_window_timespan(&self) -> Duration
pub fn averaging_window_timespan(&self) -> Duration
Returns the averaging window timespan for the network upgrade.
AveragingWindowTimespan
from the Zcash specification.
sourcepub fn averaging_window_timespan_for_height(
network: Network,
height: Height
) -> Duration
pub fn averaging_window_timespan_for_height( network: Network, height: Height ) -> Duration
Returns the averaging window timespan for network
and height
.
See NetworkUpgrade::averaging_window_timespan
for details.
sourcepub fn is_max_block_time_enforced(network: Network, height: Height) -> bool
pub fn is_max_block_time_enforced(network: Network, height: Height) -> bool
Returns true if the maximum block time rule is active for network
and height
.
Always returns true if network
is the Mainnet.
If network
is the Testnet, the height
should be at least
TESTNET_MAX_TIME_START_HEIGHT to return true.
Returns false otherwise.
Part of the consensus rules at https://zips.z.cash/protocol/protocol.pdf#blockheader
sourcepub fn from_branch_id(branch_id: u32) -> Option<NetworkUpgrade>
pub fn from_branch_id(branch_id: u32) -> Option<NetworkUpgrade>
Returns the NetworkUpgrade given an u32 as ConsensusBranchId
source§impl NetworkUpgrade
impl NetworkUpgrade
sourcepub fn branch_id_strategy() -> BoxedStrategy<NetworkUpgrade>
pub fn branch_id_strategy() -> BoxedStrategy<NetworkUpgrade>
Generates network upgrades.
sourcepub fn reduced_branch_id_strategy() -> BoxedStrategy<NetworkUpgrade>
pub fn reduced_branch_id_strategy() -> BoxedStrategy<NetworkUpgrade>
Generates network upgrades from a reduced set
Trait Implementations§
source§impl Arbitrary for NetworkUpgrade
impl Arbitrary for NetworkUpgrade
§type Parameters = ()
type Parameters = ()
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = TupleUnion<((u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>))>
type Strategy = TupleUnion<((u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>), (u32, Arc<fn() -> NetworkUpgrade>))>
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 Clone for NetworkUpgrade
impl Clone for NetworkUpgrade
source§fn clone(&self) -> NetworkUpgrade
fn clone(&self) -> NetworkUpgrade
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NetworkUpgrade
impl Debug for NetworkUpgrade
source§impl<'de> Deserialize<'de> for NetworkUpgrade
impl<'de> Deserialize<'de> for NetworkUpgrade
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 Display for NetworkUpgrade
impl Display for NetworkUpgrade
source§impl Hash for NetworkUpgrade
impl Hash for NetworkUpgrade
source§impl PartialEq for NetworkUpgrade
impl PartialEq for NetworkUpgrade
source§fn eq(&self, other: &NetworkUpgrade) -> bool
fn eq(&self, other: &NetworkUpgrade) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for NetworkUpgrade
impl Serialize for NetworkUpgrade
impl Copy for NetworkUpgrade
impl Eq for NetworkUpgrade
impl StructuralEq for NetworkUpgrade
impl StructuralPartialEq for NetworkUpgrade
Auto Trait Implementations§
impl RefUnwindSafe for NetworkUpgrade
impl Send for NetworkUpgrade
impl Sync for NetworkUpgrade
impl Unpin for NetworkUpgrade
impl UnwindSafe for NetworkUpgrade
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
§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<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
key
and return true
if they are equal.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<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> 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.