pub struct ChainSync<ZN, ZS, ZSR, ZV, ZSTip>where
ZN: Service<Request, Response = Response, Error = BoxError> + Send + Sync + Clone + 'static,
ZN::Future: Send + 'static,
ZS: Service<Request, Response = Response, Error = BoxError> + Send + Sync + Clone + 'static,
ZS::Future: Send,
ZSR: Service<ReadRequest, Response = ReadResponse, Error = BoxError> + Send + Sync + Clone + 'static,
ZSR::Future: Send,
ZV: Service<Request, Response = Hash, Error = BoxError> + Send + Sync + Clone + 'static,
ZV::Future: Send,
ZSTip: ChainTip + Clone + Send + 'static,{Show 17 fields
genesis_hash: Hash,
max_checkpoint_height: Height,
checkpoint_verify_concurrency_limit: usize,
full_verify_concurrency_limit: usize,
restart_delay: Option<Duration>,
tip_network: Timeout<ZN>,
downloads: Pin<Box<Downloads<ConcurrencyLimit<SuccessHedge<ConcurrencyLimit<Retry<RetryLimit, ZN>>>>, Timeout<ZV>, ZSR, ZSTip>>>,
state: ZS,
latest_chain_tip: ZSTip,
prospective_tips: HashSet<CheckedTip>,
recent_syncs: RecentSyncLengths,
past_lookahead_limit_receiver: WatchReceiver<bool>,
misbehavior_sender: Sender<MisbehaviorReport>,
reobtain_hashes: IndexSet<Hash>,
block_reobtain_retries: HashMap<Hash, u8>,
utxo_race_drops: usize,
diagnostics: Sender<SyncDiagnostics>,
}Fields§
§genesis_hash: HashThe genesis hash for the configured network
max_checkpoint_height: HeightThe largest block height for the checkpoint verifier, based on the current config.
checkpoint_verify_concurrency_limit: usizeThe configured checkpoint verification concurrency limit, after applying the minimum limit.
full_verify_concurrency_limit: usizeThe configured full verification concurrency limit, after applying the minimum limit.
restart_delay: Option<Duration>Optional network override for the delay between sync restarts.
tip_network: Timeout<ZN>A network service which is used to perform ObtainTips and ExtendTips requests.
Has no retry logic, because failover is handled using fanout.
downloads: Pin<Box<Downloads<ConcurrencyLimit<SuccessHedge<ConcurrencyLimit<Retry<RetryLimit, ZN>>>>, Timeout<ZV>, ZSR, ZSTip>>>A service which downloads and verifies blocks, using the provided network and verifier services.
state: ZSThe cached block chain state.
latest_chain_tip: ZSTipAllows efficient access to the best tip of the blockchain.
prospective_tips: HashSet<CheckedTip>The tips that the syncer is currently following.
recent_syncs: RecentSyncLengthsThe lengths of recent sync responses.
past_lookahead_limit_receiver: WatchReceiver<bool>Receiver that is true when the downloader is past the lookahead limit.
This is based on the downloaded block height and the state tip height.
misbehavior_sender: Sender<MisbehaviorReport>Sender for reporting peer addresses that advertised unexpectedly invalid transactions.
reobtain_hashes: IndexSet<Hash>Blocks whose download failed with NotFound and should be re-requested on
the next sync round, instead of being silently dropped (#5709).
block_reobtain_retries: HashMap<Hash, u8>Per-hash count of how many times a NotFound block has been re-requested,
bounded by MAX_BLOCK_REOBTAIN_RETRIES.
utxo_race_drops: usizeTransparentInputNotFound drops since the last verified block, bounded by the
full-verify concurrency limit so a poisoned hash batch can’t suppress restarts.
diagnostics: Sender<SyncDiagnostics>Publishes the syncer state that the progress task logs when sync stalls.
Implementations§
Source§impl<ZN, ZS, ZSR, ZV, ZSTip> ChainSync<ZN, ZS, ZSR, ZV, ZSTip>where
ZN: Service<Request, Response = Response, Error = BoxError> + Send + Sync + Clone + 'static,
ZN::Future: Send + 'static,
ZS: Service<Request, Response = Response, Error = BoxError> + Send + Sync + Clone + 'static,
ZS::Future: Send,
ZSR: Service<ReadRequest, Response = ReadResponse, Error = BoxError> + Send + Sync + Clone + 'static,
ZSR::Future: Send,
ZV: Service<Request, Response = Hash, Error = BoxError> + Send + Sync + Clone + 'static,
ZV::Future: Send,
ZSTip: ChainTip + Clone + Send + 'static,
Polls the network to determine whether further blocks are available and
downloads them.
impl<ZN, ZS, ZSR, ZV, ZSTip> ChainSync<ZN, ZS, ZSR, ZV, ZSTip>where
ZN: Service<Request, Response = Response, Error = BoxError> + Send + Sync + Clone + 'static,
ZN::Future: Send + 'static,
ZS: Service<Request, Response = Response, Error = BoxError> + Send + Sync + Clone + 'static,
ZS::Future: Send,
ZSR: Service<ReadRequest, Response = ReadResponse, Error = BoxError> + Send + Sync + Clone + 'static,
ZSR::Future: Send,
ZV: Service<Request, Response = Hash, Error = BoxError> + Send + Sync + Clone + 'static,
ZV::Future: Send,
ZSTip: ChainTip + Clone + Send + 'static,
Polls the network to determine whether further blocks are available and downloads them.
This component is used for initial block sync, but the Inbound service is
responsible for participating in the gossip protocols used for block
diffusion.
Sourcepub fn new(
config: &ZebradConfig,
max_checkpoint_height: Height,
peers: ZN,
verifier: ZV,
state: ZS,
read_state: ZSR,
latest_chain_tip: ZSTip,
misbehavior_sender: Sender<MisbehaviorReport>,
) -> (Self, SyncStatus)
pub fn new( config: &ZebradConfig, max_checkpoint_height: Height, peers: ZN, verifier: ZV, state: ZS, read_state: ZSR, latest_chain_tip: ZSTip, misbehavior_sender: Sender<MisbehaviorReport>, ) -> (Self, SyncStatus)
Returns a new syncer instance, using:
- chain: the zebra-chain
Networkto download (Mainnet or Testnet) - peers: the zebra-network peers to contact for downloads
- verifier: the zebra-consensus verifier that checks the chain
- state: the zebra-state that stores the chain
- read_state: a read-only handle to the zebra-state, used to check downloaded block heights
- latest_chain_tip: the latest chain tip from
state
Also returns a SyncStatus to check if the syncer has likely reached the chain tip.
Sourcepub async fn sync(self) -> Result<(), Report>
pub async fn sync(self) -> Result<(), Report>
Runs the syncer to synchronize the chain and keep it synchronized.
Sourcefn record_restart(&self, reason: RestartReason, made_progress: bool)
fn record_restart(&self, reason: RestartReason, made_progress: bool)
Counts a finished sync round.
Sourceasync fn try_to_sync(&mut self) -> Result<RestartReason, RestartError>
async fn try_to_sync(&mut self) -> Result<RestartReason, RestartError>
Tries to synchronize the chain as far as it can.
Obtains some prospective tips and iteratively tries to extend them and download the missing blocks.
Returns Ok if it was able to synchronize as much of the chain as it could, and then ran
out of prospective tips or made no chain progress within BLOCK_VERIFY_TIMEOUT.
Either way, Zebra should attempt to obtain some more tips after the restart delay,
without cancelling unrelated downloads.
Returns Err if an unrecoverable service error or a timeout obtaining initial tips
requires resetting the synchronization.
Sourceasync fn try_to_sync_once(
&mut self,
extra_hashes: IndexSet<Hash>,
) -> Result<IndexSet<Hash>, RestartError>
async fn try_to_sync_once( &mut self, extra_hashes: IndexSet<Hash>, ) -> Result<IndexSet<Hash>, RestartError>
Tries to synchronize the chain once, using the existing extra_hashes.
Tries to extend the existing tips and download the missing blocks.
Returns Ok(extra_hashes) if it was able to extend once and synchronize sone of the chain.
Returns Err if there was an unrecoverable error and restarting the synchronization is
necessary.
Sourceasync fn reobtain_missing_blocks(&mut self)
async fn reobtain_missing_blocks(&mut self)
Re-issues downloads for blocks that failed with NotFound (#5709).
These are re-requested even while the download pipeline is past its
lookahead limit, because a missing low block is exactly what stops the
checkpoint verifier from advancing. Waiting for the lookahead pause to
clear would deadlock — the pause cannot clear until this block arrives.
The per-hash retry count is bounded by MAX_BLOCK_REOBTAIN_RETRIES.
Blocks that can’t get network capacity before the download deadline stay queued for the
next sync round.
Sourceasync fn obtain_tips(&mut self) -> Result<IndexSet<Hash>, Report>
async fn obtain_tips(&mut self) -> Result<IndexSet<Hash>, Report>
Given a block_locator list fan out request for subsequent hashes to multiple peers
async fn extend_tips(&mut self) -> Result<IndexSet<Hash>, Report>
Sourceasync fn request_genesis(&mut self) -> Result<(), Report>
async fn request_genesis(&mut self) -> Result<(), Report>
Download and verify the genesis block, if it isn’t currently known to our node.
Sourceasync fn request_genesis_once(
&mut self,
) -> Result<Result<(Height, Hash), BlockDownloadVerifyError>, Report>
async fn request_genesis_once( &mut self, ) -> Result<Result<(Height, Hash), BlockDownloadVerifyError>, Report>
Try to download and verify the genesis block once.
Fatal errors are returned in the outer result, temporary errors in the inner one.
Sourceasync fn request_blocks(
&mut self,
hashes: IndexSet<Hash>,
) -> Result<IndexSet<Hash>, BlockDownloadVerifyError>
async fn request_blocks( &mut self, hashes: IndexSet<Hash>, ) -> Result<IndexSet<Hash>, BlockDownloadVerifyError>
Queue download and verify tasks for each block that isn’t currently known to our node.
TODO: turn obtain and extend tips into a separate task, which sends hashes via a channel?
Sourcefn lookahead_limit(&self) -> usize
fn lookahead_limit(&self) -> usize
The configured lookahead limit, including room to finish the final checkpoint before switching to full verification.
Sourcefn handle_block_response(
&mut self,
response: Result<(Height, Hash), BlockDownloadVerifyError>,
) -> Result<(), BlockDownloadVerifyError>
fn handle_block_response( &mut self, response: Result<(Height, Hash), BlockDownloadVerifyError>, ) -> Result<(), BlockDownloadVerifyError>
Handles a response for a requested block.
See Self::handle_response for more details.
Sourcefn is_utxo_lookup_timeout(e: &BlockDownloadVerifyError) -> bool
fn is_utxo_lookup_timeout(e: &BlockDownloadVerifyError) -> bool
Returns true for the AwaitUtxo timeout that should_restart_sync exempts (#11168).
Sourcefn is_post_checkpoint_verify_timeout(e: &BlockDownloadVerifyError) -> bool
fn is_post_checkpoint_verify_timeout(e: &BlockDownloadVerifyError) -> bool
Returns true for the short post-final-checkpoint verify timeout (#5125) that
should_restart_sync exempts; the 8-minute tower timeout is a different type.
Sourcefn is_queue_full(e: &BlockDownloadVerifyError) -> bool
fn is_queue_full(e: &BlockDownloadVerifyError) -> bool
Returns true if the verifier dropped a block because its queue was full.
The block might be valid, and Zebra might need it, so should_restart_sync exempts it,
and the syncer requests it again a few times.
Sourcefn block_error_kind(e: &BlockDownloadVerifyError) -> &'static str
fn block_error_kind(e: &BlockDownloadVerifyError) -> &'static str
Returns a bounded label for a block download or verify error, for metrics and logs.
Sourceasync fn queue_block(
&mut self,
hash: Hash,
) -> Result<(), BlockDownloadVerifyError>
async fn queue_block( &mut self, hash: Hash, ) -> Result<(), BlockDownloadVerifyError>
Queues hash for download and verification, which can wait for network capacity.
Publishes the downloads before that wait. A block that is already queued isn’t counted as an error, because the syncer ignores that error: it happens when a timed-out genesis attempt or an earlier round left the block queued. Neither is a rejected early relay block, because its failure was already counted.
Sourcefn count_cancelled_network_wait(&mut self) -> bool
fn count_cancelled_network_wait(&mut self) -> bool
Counts a block whose wait for network capacity an enclosing timeout cancelled, as the network readiness timeout it would have reached, and returns whether there was one.
Sourcefn stage_timeout_error(
&mut self,
reason: RestartReason,
elapsed: Elapsed,
) -> RestartError
fn stage_timeout_error( &mut self, reason: RestartReason, elapsed: Elapsed, ) -> RestartError
Returns the error for a sync stage that its timeout cancelled, as reason, or as a block
error if the stage was waiting for network capacity, which also counts that block.
Sourcefn genesis_timeout(&mut self) -> BlockDownloadVerifyError
fn genesis_timeout(&mut self) -> BlockDownloadVerifyError
Returns the error for a genesis attempt that the genesis timeout cancelled, and counts it if the block was still waiting for network capacity.
Sourcefn count_finished_block_errors(&mut self)
fn count_finished_block_errors(&mut self)
Counts the errors of downloads that finished without the syncer reading their results, before a restart drops them.
Sourcefn count_block_error(&self, error: &BlockDownloadVerifyError)
fn count_block_error(&self, error: &BlockDownloadVerifyError)
Counts a block that failed to queue, download, or verify.
Sourcefn tips_restart_error(reason: RestartReason, error: Report) -> RestartError
fn tips_restart_error(reason: RestartReason, error: Report) -> RestartError
Wraps an error from obtaining or extending tips, which also queue the blocks they find, so a block that failed to queue is reported as a block error.
Sourcefn block_restart_error(error: BlockDownloadVerifyError) -> RestartError
fn block_restart_error(error: BlockDownloadVerifyError) -> RestartError
Wraps a block error that restarts the sync.
Sourcefn handle_hash_response(
response: Result<IndexSet<Hash>, BlockDownloadVerifyError>,
) -> Result<IndexSet<Hash>, BlockDownloadVerifyError>
fn handle_hash_response( response: Result<IndexSet<Hash>, BlockDownloadVerifyError>, ) -> Result<IndexSet<Hash>, BlockDownloadVerifyError>
Handles a response to block hash submission, passing through any extra hashes.
See Self::handle_response for more details.
Sourcefn handle_response<T>(
response: Result<T, BlockDownloadVerifyError>,
) -> Result<(), BlockDownloadVerifyError>
fn handle_response<T>( response: Result<T, BlockDownloadVerifyError>, ) -> Result<(), BlockDownloadVerifyError>
Handles a response to a syncer request.
Returns Ok if the request was successful, or if an expected error occurred,
so that the synchronization can continue normally.
Returns Err if an unexpected error occurred, to force the synchronizer to restart.
Sourcepub(crate) async fn state_contains(
&mut self,
hash: Hash,
) -> Result<bool, Report>
pub(crate) async fn state_contains( &mut self, hash: Hash, ) -> Result<bool, Report>
Returns true if the hash is present in the state, and false
if the hash is not present in the state.
Blocks that are only queued in the state, waiting for their parent, are treated as not present. A sync restart cancels in-flight downloads, so the parent of a queued block may never arrive unless the syncer downloads it again along with its queued children. If the syncer skipped queued blocks, discovery could lose the continuation needed to recover their missing parents. Re-submitting a queued block is harmless: the block verifier rejects it as a duplicate, which doesn’t restart the sync.
fn update_metrics(&mut self)
Sourcefn is_block_validation_error(error: &RouterError) -> bool
fn is_block_validation_error(error: &RouterError) -> bool
Returns true for failures specific to the block, rather than verifier, state, or shutdown failures.
Sourcefn is_block_body_error(error: &RouterError) -> bool
fn is_block_body_error(error: &RouterError) -> bool
Returns true for body validation failures that do not invalidate the requested header hash.
Sourcefn should_restart_sync(e: &BlockDownloadVerifyError) -> bool
fn should_restart_sync(e: &BlockDownloadVerifyError) -> bool
Return if the sync should be restarted based on the given error from the block downloader and verifier stream.
Auto Trait Implementations§
impl<ZN, ZS, ZSR, ZV, ZSTip> !RefUnwindSafe for ChainSync<ZN, ZS, ZSR, ZV, ZSTip>
impl<ZN, ZS, ZSR, ZV, ZSTip> !UnwindSafe for ChainSync<ZN, ZS, ZSR, ZV, ZSTip>
impl<ZN, ZS, ZSR, ZV, ZSTip> Freeze for ChainSync<ZN, ZS, ZSR, ZV, ZSTip>where
Timeout<ZN>: Freeze,
Pin<Box<Downloads<ConcurrencyLimit<SuccessHedge<ConcurrencyLimit<Retry<RetryLimit, ZN>>>>, Timeout<ZV>, ZSR, ZSTip>>>: Freeze,
ZS: Freeze,
ZSTip: Freeze,
impl<ZN, ZS, ZSR, ZV, ZSTip> Send for ChainSync<ZN, ZS, ZSR, ZV, ZSTip>where
Timeout<ZN>: Send,
Pin<Box<Downloads<ConcurrencyLimit<SuccessHedge<ConcurrencyLimit<Retry<RetryLimit, ZN>>>>, Timeout<ZV>, ZSR, ZSTip>>>: Send,
impl<ZN, ZS, ZSR, ZV, ZSTip> Sync for ChainSync<ZN, ZS, ZSR, ZV, ZSTip>where
Timeout<ZN>: Sync,
Pin<Box<Downloads<ConcurrencyLimit<SuccessHedge<ConcurrencyLimit<Retry<RetryLimit, ZN>>>>, Timeout<ZV>, ZSR, ZSTip>>>: Sync,
ZSTip: Sync,
impl<ZN, ZS, ZSR, ZV, ZSTip> Unpin for ChainSync<ZN, ZS, ZSR, ZV, ZSTip>where
Timeout<ZN>: Unpin,
Pin<Box<Downloads<ConcurrencyLimit<SuccessHedge<ConcurrencyLimit<Retry<RetryLimit, ZN>>>>, Timeout<ZV>, ZSR, ZSTip>>>: Unpin,
ZS: Unpin,
ZSTip: Unpin,
impl<ZN, ZS, ZSR, ZV, ZSTip> UnsafeUnpin for ChainSync<ZN, ZS, ZSR, ZV, ZSTip>where
Timeout<ZN>: UnsafeUnpin,
Pin<Box<Downloads<ConcurrencyLimit<SuccessHedge<ConcurrencyLimit<Retry<RetryLimit, ZN>>>>, Timeout<ZV>, ZSR, ZSTip>>>: UnsafeUnpin,
ZS: UnsafeUnpin,
ZSTip: UnsafeUnpin,
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<T> ErasedDestructor for Twhere
T: 'static,
§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> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].impl<T> MaybeSendSync for T
§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_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, 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) -> 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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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)) -> 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> ⓘ
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§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>,
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.