pub struct Verifier<ZS, Mempool> {
network: Network,
state: Timeout<ZS>,
mempool: Option<Timeout<Mempool>>,
script_verifier: Verifier,
mempool_setup_rx: Receiver<Mempool>,
}Expand description
Fields§
§network: Network§state: Timeout<ZS>§mempool: Option<Timeout<Mempool>>§script_verifier: Verifier§mempool_setup_rx: Receiver<Mempool>Implementations§
Source§impl<ZS, Mempool> Verifier<ZS, Mempool>
impl<ZS, Mempool> Verifier<ZS, Mempool>
Sourcefn verify_block(
&self,
req: Request,
) -> Pin<Box<dyn Future<Output = Result<Response, TransactionError>> + Send + 'static>>
fn verify_block( &self, req: Request, ) -> Pin<Box<dyn Future<Output = Result<Response, TransactionError>> + Send + 'static>>
Verifies a transaction in block context.
Sourcefn verify_mempool(
&self,
req: Request,
) -> Pin<Box<dyn Future<Output = Result<Response, TransactionError>> + Send + 'static>>
fn verify_mempool( &self, req: Request, ) -> Pin<Box<dyn Future<Output = Result<Response, TransactionError>> + Send + 'static>>
Verifies a transaction in mempool context.
Sourcefn check_structure_and_network_rules(
tx: &Transaction,
height: Height,
network: &Network,
) -> Result<(), TransactionError>
fn check_structure_and_network_rules( tx: &Transaction, height: Height, network: &Network, ) -> Result<(), TransactionError>
Performs basic structural validation and Orchard-related network upgrade rules.
Sourcefn check_transaction_invariants(
tx: &Transaction,
height: Height,
network: &Network,
) -> Result<(), TransactionError>
fn check_transaction_invariants( tx: &Transaction, height: Height, network: &Network, ) -> Result<(), TransactionError>
Validates transaction invariants.
Sourceasync fn verify_mempool_lock_time(
tx: &Transaction,
height: Height,
state: Timeout<ZS>,
) -> Result<(), TransactionError>
async fn verify_mempool_lock_time( tx: &Transaction, height: Height, state: Timeout<ZS>, ) -> Result<(), TransactionError>
Validates mempool lock-time consensus rules.
Queries state only for time-based lock times.
Sourceasync fn mempool_best_chain_next_median_time_past(
state: Timeout<ZS>,
) -> Result<DateTime32, TransactionError>
async fn mempool_best_chain_next_median_time_past( state: Timeout<ZS>, ) -> Result<DateTime32, TransactionError>
Fetches the median-time-past of the next block after the best state tip.
This is used to verify that the lock times of mempool transactions can be included in any valid next block.
Sourceasync fn block_spent_utxos(
tx: Arc<Transaction>,
known_utxos: Arc<HashMap<OutPoint, OrderedUtxo>>,
state: Timeout<ZS>,
) -> Result<(HashMap<OutPoint, Utxo>, Vec<Output>), TransactionError>
async fn block_spent_utxos( tx: Arc<Transaction>, known_utxos: Arc<HashMap<OutPoint, OrderedUtxo>>, state: Timeout<ZS>, ) -> Result<(HashMap<OutPoint, Utxo>, Vec<Output>), TransactionError>
Looks up UTXOs spent by tx from the best chain state, also checking
known_utxos for UTXOs from earlier transactions in the same block.
Returns an OutPoint -> Utxo map and a vec of Outputs in the same
order as the matching inputs in tx.
Sourceasync fn mempool_spent_utxos(
tx: Arc<Transaction>,
height: Height,
state: Timeout<ZS>,
mempool: Option<Timeout<Mempool>>,
) -> Result<(HashMap<OutPoint, Utxo>, Vec<Output>, Vec<OutPoint>), TransactionError>
async fn mempool_spent_utxos( tx: Arc<Transaction>, height: Height, state: Timeout<ZS>, mempool: Option<Timeout<Mempool>>, ) -> Result<(HashMap<OutPoint, Utxo>, Vec<Output>, Vec<OutPoint>), TransactionError>
Looks up UTXOs spent by a mempool tx, first querying the best chain state
and then the mempool for inputs whose outputs are not present in the best chain.
height is the next block height, used to construct Utxo values for
outputs sourced from the mempool.
Returns an OutPoint -> Utxo map, a vec of Outputs in the same order
as the matching inputs in tx, and a vec of OutPoints that were
sourced from the mempool rather than the best chain.
Sourcefn check_maturity_height(
tx: Arc<Transaction>,
height: Height,
network: &Network,
spent_utxos: &HashMap<OutPoint, Utxo>,
) -> Result<(), TransactionError>
fn check_maturity_height( tx: Arc<Transaction>, height: Height, network: &Network, spent_utxos: &HashMap<OutPoint, Utxo>, ) -> Result<(), TransactionError>
Checks that every transparent coinbase output spent by tx has matured
by height.
This check applies only to mempool transactions. Block transactions are checked during contextual validation in the state (see #2336).
Calls check::tx_transparent_coinbase_spends_maturity with an empty
block_new_outputs map, since mempool transactions have no block context.
Returns Ok(()) if every transparent coinbase output spent by the transaction is
mature and valid for the given height, or a TransactionError if the transaction
spends transparent coinbase outputs that are immature and invalid for the given height.
Sourcefn dispatch_version_verification(
tx: &Transaction,
nu: NetworkUpgrade,
script_verifier: Verifier,
cached_ffi_transaction: Arc<CachedFfiTransaction>,
) -> Result<AsyncChecks, TransactionError>
fn dispatch_version_verification( tx: &Transaction, nu: NetworkUpgrade, script_verifier: Verifier, cached_ffi_transaction: Arc<CachedFfiTransaction>, ) -> Result<AsyncChecks, TransactionError>
Dispatches version-specific async verification checks for tx.
nu is the network upgrade active at the transaction’s block height,
pre-computed by the caller from req.upgrade(&network).
Returns TransactionError::WrongVersion for V1-V3 transactions, which
are not supported by any network upgrade Zebra verifies.
Sourcefn verify_v4_transaction(
tx: &Transaction,
nu: NetworkUpgrade,
script_verifier: Verifier,
cached_ffi_transaction: Arc<CachedFfiTransaction>,
joinsplit_data: &Option<JoinSplitData<Groth16Proof>>,
) -> Result<AsyncChecks, TransactionError>
fn verify_v4_transaction( tx: &Transaction, nu: NetworkUpgrade, script_verifier: Verifier, cached_ffi_transaction: Arc<CachedFfiTransaction>, joinsplit_data: &Option<JoinSplitData<Groth16Proof>>, ) -> Result<AsyncChecks, TransactionError>
Verify a V4 transaction.
Returns a set of asynchronous checks that must all succeed for the transaction to be considered valid. These checks include:
- transparent transfers
- sprout shielded data
- sapling shielded data
The parameters of this method are:
- the
txtransaction to verify - the
nunetwork upgrade active at the transaction’s block height - the
script_verifierto use for verifying the transparent transfers - the prepared
cached_ffi_transactionused by the script verifier - the Sprout
joinsplit_datashielded data in the transaction
Sourcefn verify_v4_transaction_network_upgrade(
transaction: &Transaction,
network_upgrade: NetworkUpgrade,
) -> Result<(), TransactionError>
fn verify_v4_transaction_network_upgrade( transaction: &Transaction, network_upgrade: NetworkUpgrade, ) -> Result<(), TransactionError>
Verifies if a V4 transaction is supported by network_upgrade.
Sourcefn verify_v5_transaction(
tx: &Transaction,
nu: NetworkUpgrade,
script_verifier: Verifier,
cached_ffi_transaction: Arc<CachedFfiTransaction>,
) -> Result<AsyncChecks, TransactionError>
fn verify_v5_transaction( tx: &Transaction, nu: NetworkUpgrade, script_verifier: Verifier, cached_ffi_transaction: Arc<CachedFfiTransaction>, ) -> Result<AsyncChecks, TransactionError>
Verify a V5 transaction.
Returns a set of asynchronous checks that must all succeed for the transaction to be considered valid. These checks include:
- transaction support by the considered network upgrade (see
Request::upgrade) - transparent transfers
- sapling shielded data (TODO)
- orchard shielded data (TODO)
The parameters of this method are:
- the
txtransaction to verify - the
nunetwork upgrade active at the transaction’s block height - the
script_verifierto use for verifying the transparent transfers - the prepared
cached_ffi_transactionused by the script verifier
Sourcefn verify_v5_transaction_network_upgrade(
transaction: &Transaction,
network_upgrade: NetworkUpgrade,
) -> Result<(), TransactionError>
fn verify_v5_transaction_network_upgrade( transaction: &Transaction, network_upgrade: NetworkUpgrade, ) -> Result<(), TransactionError>
Verifies if a V5 transaction is supported by network_upgrade.
Sourcefn verify_v6_transaction(
tx: &Transaction,
nu: NetworkUpgrade,
script_verifier: Verifier,
cached_ffi_transaction: Arc<CachedFfiTransaction>,
) -> Result<AsyncChecks, TransactionError>
fn verify_v6_transaction( tx: &Transaction, nu: NetworkUpgrade, script_verifier: Verifier, cached_ffi_transaction: Arc<CachedFfiTransaction>, ) -> Result<AsyncChecks, TransactionError>
Verifies a V6 (NU6.3 / Ironwood) transaction’s shielded data.
Differs from Self::verify_v5_transaction in the Orchard verifier: a v6 Orchard bundle
commits to the NU6.3 cross-address circuit, so it (and the Ironwood bundle) verify under the
NU6.3 key, not the v5 fixed key.
Sourcefn verify_v6_transaction_network_upgrade(
transaction: &Transaction,
network_upgrade: NetworkUpgrade,
) -> Result<(), TransactionError>
fn verify_v6_transaction_network_upgrade( transaction: &Transaction, network_upgrade: NetworkUpgrade, ) -> Result<(), TransactionError>
Verifies that a V6 transaction is supported by network_upgrade.
V6 transactions are only valid from NU6.3 onward.
Sourcefn verify_transparent_inputs_and_outputs(
tx: &Transaction,
script_verifier: Verifier,
cached_ffi_transaction: Arc<CachedFfiTransaction>,
) -> Result<AsyncChecks, TransactionError>
fn verify_transparent_inputs_and_outputs( tx: &Transaction, script_verifier: Verifier, cached_ffi_transaction: Arc<CachedFfiTransaction>, ) -> Result<AsyncChecks, TransactionError>
Verifies if a transaction’s transparent inputs are valid using the provided
script_verifier and cached_ffi_transaction.
Returns script verification responses via the utxo_sender.
Sourcefn verify_sprout_shielded_data(
joinsplit_data: &Option<JoinSplitData<Groth16Proof>>,
shielded_sighash: &SigHash,
) -> Result<AsyncChecks, TransactionError>
fn verify_sprout_shielded_data( joinsplit_data: &Option<JoinSplitData<Groth16Proof>>, shielded_sighash: &SigHash, ) -> Result<AsyncChecks, TransactionError>
Verifies a transaction’s Sprout shielded join split data.
Sourcefn verify_sapling_bundle(
bundle: Option<Bundle<Authorized, ZatBalance>>,
sighash: &SigHash,
) -> AsyncChecks
fn verify_sapling_bundle( bundle: Option<Bundle<Authorized, ZatBalance>>, sighash: &SigHash, ) -> AsyncChecks
Verifies a transaction’s Sapling shielded data.
Sourcefn verify_orchard_bundle(
bundle: Option<Bundle<Authorized, ZatBalance>>,
sighash: &SigHash,
network_upgrade: NetworkUpgrade,
) -> AsyncChecks
fn verify_orchard_bundle( bundle: Option<Bundle<Authorized, ZatBalance>>, sighash: &SigHash, network_upgrade: NetworkUpgrade, ) -> AsyncChecks
Verifies a v5 transaction’s Orchard bundle.
A v5 Orchard bundle commits to the Orchard Action circuit of the block’s era, so the
verifying key is selected by network_upgrade via
primitives::halo2::orchard_v5_verifier_for: the historical insecure key before NU6.2, the
fixed key from NU6.2 until NU6.3, and the NU6.3 key from NU6.3 onward. The Orchard-pool
cross-address restriction applies to every Orchard Action from NU6.3 onward regardless of
transaction version (ZIP 229), so a v5 bundle at NU6.3 uses the NU6.3 circuit — the same key
as v6 Orchard and Ironwood bundles — not the fixed one.
Sourcefn verify_orchard_v6_bundle(
bundle: Option<Bundle<Authorized, ZatBalance>>,
sighash: &SigHash,
) -> AsyncChecks
fn verify_orchard_v6_bundle( bundle: Option<Bundle<Authorized, ZatBalance>>, sighash: &SigHash, ) -> AsyncChecks
Verifies a v6 transaction’s Orchard bundle.
A v6 Orchard bundle commits to the NU6.3 cross-address circuit, so it always verifies under
the NU6.3 key (primitives::halo2::orchard_v6_verifier), independent of the block’s
network upgrade (v6 transactions only exist from NU6.3 onward). The Ironwood bundle reuses
the same verifier.
Sourcefn queue_orchard_bundle(
select_verifier: impl FnOnce() -> &'static VerifierService,
bundle: Option<Bundle<Authorized, ZatBalance>>,
sighash: &SigHash,
) -> AsyncChecks
fn queue_orchard_bundle( select_verifier: impl FnOnce() -> &'static VerifierService, bundle: Option<Bundle<Authorized, ZatBalance>>, sighash: &SigHash, ) -> AsyncChecks
Queues an Orchard-shaped bundle’s single aggregated Halo2 proof against a verifier.
§Consensus
The proof 𝜋 MUST be valid given a primary input (cv, rt^{Orchard}, nf, rk, cm_x, enableSpends, enableOutputs)
https://zips.z.cash/protocol/protocol.pdf#actiondesc
Unlike Sapling, Orchard shielded transactions have a single aggregated Halo2 proof per
transaction, even with multiple Actions, so it is queued for verification only once instead
of once per Action description. The choice of verifying key is the caller’s; see
Self::verify_orchard_bundle and Self::verify_orchard_v6_bundle.
select_verifier is only invoked when a bundle is present, so a bundle-less transaction
never forces the (lazily initialized) verifier services.
Sourcefn miner_fee(
tx: &Transaction,
spent_utxos: &HashMap<OutPoint, Utxo>,
) -> Result<Amount<NonNegative>, TransactionError>
fn miner_fee( tx: &Transaction, spent_utxos: &HashMap<OutPoint, Utxo>, ) -> Result<Amount<NonNegative>, TransactionError>
Calculate the miner fee from the transaction’s value balance.
Trait Implementations§
Source§impl<ZS, Mempool> Service<Request> for Verifier<ZS, Mempool>
impl<ZS, Mempool> Service<Request> for Verifier<ZS, Mempool>
Source§type Error = TransactionError
type Error = TransactionError
Source§type Future = Pin<Box<dyn Future<Output = Result<<Verifier<ZS, Mempool> as Service<Request>>::Response, <Verifier<ZS, Mempool> as Service<Request>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<Verifier<ZS, Mempool> as Service<Request>>::Response, <Verifier<ZS, Mempool> as Service<Request>>::Error>> + Send>>
Auto Trait Implementations§
impl<ZS, Mempool> !RefUnwindSafe for Verifier<ZS, Mempool>
impl<ZS, Mempool> !UnwindSafe for Verifier<ZS, Mempool>
impl<ZS, Mempool> Freeze for Verifier<ZS, Mempool>
impl<ZS, Mempool> Send for Verifier<ZS, Mempool>
impl<ZS, Mempool> Sync for Verifier<ZS, Mempool>
impl<ZS, Mempool> Unpin for Verifier<ZS, Mempool>
impl<ZS, Mempool> UnsafeUnpin for Verifier<ZS, Mempool>where
ZS: UnsafeUnpin,
Mempool: 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> 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>
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::RequestSource§impl<S, Request> IsReady<Request> for Swhere
S: Service<Request> + Send,
Request: 'static,
impl<S, Request> IsReady<Request> for Swhere
S: Service<Request> + Send,
Request: 'static,
Source§fn is_ready(&mut self) -> Pin<Box<dyn Future<Output = bool> + Send + '_>>
fn is_ready(&mut self) -> Pin<Box<dyn Future<Output = bool> + Send + '_>>
Service] once, and return true if it is immediately ready to be called.§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<S, R> ServiceExt<R> for Swhere
S: Service<R>,
impl<S, R> ServiceExt<R> for Swhere
S: Service<R>,
§fn into_make_service(self) -> IntoMakeService<S>
fn into_make_service(self) -> IntoMakeService<S>
MakeService, that is a [Service] whose
response is another service. Read more§fn handle_error<F, T>(self, f: F) -> HandleError<Self, F, T>
fn handle_error<F, T>(self, f: F) -> HandleError<Self, F, T>
HandleError, that will handle errors
by converting them into responses. Read more§impl<T, Request> ServiceExt<Request> for Twhere
T: Service<Request> + ?Sized,
impl<T, Request> ServiceExt<Request> for Twhere
T: Service<Request> + ?Sized,
§fn ready(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
fn ready(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
§fn ready_and(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
fn ready_and(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
please use the ServiceExt::ready method instead
§fn ready_oneshot(self) -> ReadyOneshot<Self, Request>where
Self: Sized,
fn ready_oneshot(self) -> ReadyOneshot<Self, Request>where
Self: Sized,
§fn oneshot(self, req: Request) -> Oneshot<Self, Request>where
Self: Sized,
fn oneshot(self, req: Request) -> Oneshot<Self, Request>where
Self: Sized,
Service, calling with the providing request once it is ready.§fn and_then<F>(self, f: F) -> AndThen<Self, F>
fn and_then<F>(self, f: F) -> AndThen<Self, F>
poll_ready method. Read more§fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
poll_ready method. Read more§fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
poll_ready method. Read more§fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
Result<Self::Response, Self::Error>)
to a different value, regardless of whether the future succeeds or
fails. Read more§fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
§fn filter<F, NewRequest>(self, filter: F) -> Filter<Self, F>where
Self: Sized,
F: Predicate<NewRequest>,
fn filter<F, NewRequest>(self, filter: F) -> Filter<Self, F>where
Self: Sized,
F: Predicate<NewRequest>,
§fn filter_async<F, NewRequest>(self, filter: F) -> AsyncFilter<Self, F>where
Self: Sized,
F: AsyncPredicate<NewRequest>,
fn filter_async<F, NewRequest>(self, filter: F) -> AsyncFilter<Self, F>where
Self: Sized,
F: AsyncPredicate<NewRequest>,
AsyncFilter that conditionally accepts or
rejects requests based on an [async predicate]. Read more§fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
§fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
§impl<T, Request> ServiceExt<Request> for Twhere
T: Service<Request> + ?Sized,
impl<T, Request> ServiceExt<Request> for Twhere
T: Service<Request> + ?Sized,
§fn ready(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
fn ready(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
§fn ready_oneshot(self) -> ReadyOneshot<Self, Request>where
Self: Sized,
fn ready_oneshot(self) -> ReadyOneshot<Self, Request>where
Self: Sized,
§fn oneshot(self, req: Request) -> Oneshot<Self, Request>where
Self: Sized,
fn oneshot(self, req: Request) -> Oneshot<Self, Request>where
Self: Sized,
Service, calling it with the provided request once it is ready.§fn and_then<F>(self, f: F) -> AndThen<Self, F>
fn and_then<F>(self, f: F) -> AndThen<Self, F>
poll_ready method. Read more§fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
poll_ready method. Read more§fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
poll_ready method. Read more§fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
Result<Self::Response, Self::Error>)
to a different value, regardless of whether the future succeeds or
fails. Read more§fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
§fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
§fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
§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.