pub struct DiskWriteBatch {
batch: WriteBatch,
}
Expand description
Wrapper struct to ensure low-level database writes go through the correct API.
[rocksdb::WriteBatch
] is a batched set of database updates,
which must be written to the database using DiskDb::write(batch)
.
Fields§
§batch: WriteBatch
The inner RocksDB write batch.
Implementations§
source§impl DiskWriteBatch
impl DiskWriteBatch
sourcepub fn new() -> Self
pub fn new() -> Self
Creates and returns a new transactional batch write.
§Correctness
Each block must be written to the state inside a batch, so that:
- concurrent
ReadStateService
queries don’t see half-written blocks, and - if Zebra calls
exit
, panics, or crashes, half-written blocks are rolled back.
source§impl DiskWriteBatch
impl DiskWriteBatch
sourcepub fn prepare_block_batch(
&mut self,
zebra_db: &ZebraDb,
network: &Network,
finalized: &FinalizedBlock,
new_outputs_by_out_loc: BTreeMap<OutputLocation, Utxo>,
spent_utxos_by_outpoint: HashMap<OutPoint, Utxo>,
spent_utxos_by_out_loc: BTreeMap<OutputLocation, Utxo>,
address_balances: HashMap<Address, AddressBalanceLocation>,
value_pool: ValueBalance<NonNegative>,
prev_note_commitment_trees: Option<NoteCommitmentTrees>,
) -> Result<(), BoxError>
pub fn prepare_block_batch( &mut self, zebra_db: &ZebraDb, network: &Network, finalized: &FinalizedBlock, new_outputs_by_out_loc: BTreeMap<OutputLocation, Utxo>, spent_utxos_by_outpoint: HashMap<OutPoint, Utxo>, spent_utxos_by_out_loc: BTreeMap<OutputLocation, Utxo>, address_balances: HashMap<Address, AddressBalanceLocation>, value_pool: ValueBalance<NonNegative>, prev_note_commitment_trees: Option<NoteCommitmentTrees>, ) -> Result<(), BoxError>
Prepare a database batch containing finalized.block
,
and return it (without actually writing anything).
If this method returns an error, it will be propagated, and the batch should not be written to the database.
§Errors
- Propagates any errors from updating history tree, note commitment trees, or value pools
sourcepub fn prepare_block_header_and_transaction_data_batch(
&mut self,
db: &DiskDb,
finalized: &FinalizedBlock,
) -> Result<(), BoxError>
pub fn prepare_block_header_and_transaction_data_batch( &mut self, db: &DiskDb, finalized: &FinalizedBlock, ) -> Result<(), BoxError>
Prepare a database batch containing the block header and transaction data
from finalized.block
, and return it (without actually writing anything).
§Errors
- This method does not currently return any errors.
source§impl DiskWriteBatch
impl DiskWriteBatch
sourcepub fn update_history_tree(&mut self, db: &ZebraDb, tree: &HistoryTree)
pub fn update_history_tree(&mut self, db: &ZebraDb, tree: &HistoryTree)
Updates the history tree for the tip, if it is not empty.
The batch must be written to the database by the caller.
sourcepub fn delete_range_history_tree(
&mut self,
db: &ZebraDb,
from: &Height,
until_strictly_before: &Height,
)
pub fn delete_range_history_tree( &mut self, db: &ZebraDb, from: &Height, until_strictly_before: &Height, )
Legacy method: Deletes the range of history trees at the given Height
s.
Doesn’t delete the upper bound.
From state format 25.3.0 onwards, the history trees are indexed by an empty key, so this method does nothing.
The batch must be written to the database by the caller.
sourcepub fn prepare_chain_value_pools_batch(
&mut self,
db: &ZebraDb,
finalized: &FinalizedBlock,
utxos_spent_by_block: HashMap<OutPoint, Utxo>,
value_pool: ValueBalance<NonNegative>,
) -> Result<(), BoxError>
pub fn prepare_chain_value_pools_batch( &mut self, db: &ZebraDb, finalized: &FinalizedBlock, utxos_spent_by_block: HashMap<OutPoint, Utxo>, value_pool: ValueBalance<NonNegative>, ) -> Result<(), BoxError>
Prepares a database batch containing the chain value pool update from finalized.block
, and
returns it without actually writing anything.
The batch is modified by this method and written by the caller. The caller should not write the batch if this method returns an error.
The parameter utxos_spent_by_block
must contain the transparent::Utxo
s of every input
in this block, including UTXOs created by earlier transactions in this block.
Note that the chain value pool has the opposite sign to the transaction value pool. See the
chain_value_pool_change
and add_chain_value_pool_change
methods for more details.
§Errors
- Propagates any errors from updating value pools
source§impl DiskWriteBatch
impl DiskWriteBatch
sourcepub fn prepare_shielded_transaction_batch(
&mut self,
db: &DiskDb,
finalized: &FinalizedBlock,
) -> Result<(), BoxError>
pub fn prepare_shielded_transaction_batch( &mut self, db: &DiskDb, finalized: &FinalizedBlock, ) -> Result<(), BoxError>
Prepare a database batch containing finalized.block
’s shielded transaction indexes,
and return it (without actually writing anything).
If this method returns an error, it will be propagated, and the batch should not be written to the database.
§Errors
- Propagates any errors from updating note commitment trees
sourcepub fn prepare_nullifier_batch(
&mut self,
db: &DiskDb,
transaction: &Transaction,
) -> Result<(), BoxError>
pub fn prepare_nullifier_batch( &mut self, db: &DiskDb, transaction: &Transaction, ) -> Result<(), BoxError>
Prepare a database batch containing finalized.block
’s nullifiers,
and return it (without actually writing anything).
§Errors
- This method doesn’t currently return any errors, but it might in future
sourcepub fn prepare_trees_batch(
&mut self,
zebra_db: &ZebraDb,
finalized: &FinalizedBlock,
prev_note_commitment_trees: Option<NoteCommitmentTrees>,
) -> Result<(), BoxError>
pub fn prepare_trees_batch( &mut self, zebra_db: &ZebraDb, finalized: &FinalizedBlock, prev_note_commitment_trees: Option<NoteCommitmentTrees>, ) -> Result<(), BoxError>
Prepare a database batch containing the note commitment and history tree updates
from finalized.block
, and return it (without actually writing anything).
If this method returns an error, it will be propagated, and the batch should not be written to the database.
§Errors
- Propagates any errors from updating the history tree
sourcepub fn update_sprout_tree(
&mut self,
zebra_db: &ZebraDb,
tree: &NoteCommitmentTree,
)
pub fn update_sprout_tree( &mut self, zebra_db: &ZebraDb, tree: &NoteCommitmentTree, )
Updates the Sprout note commitment tree for the tip, and the Sprout anchors.
sourcepub fn delete_range_sprout_tree(
&mut self,
zebra_db: &ZebraDb,
from: &Height,
to: &Height,
)
pub fn delete_range_sprout_tree( &mut self, zebra_db: &ZebraDb, from: &Height, to: &Height, )
Legacy method: Deletes the range of Sprout note commitment trees at the given Height
s.
Doesn’t delete anchors from the anchor index. Doesn’t delete the upper bound.
From state format 25.3.0 onwards, the Sprout trees are indexed by an empty key, so this method does nothing.
sourcepub fn delete_sprout_anchor(&mut self, zebra_db: &ZebraDb, anchor: &Root)
pub fn delete_sprout_anchor(&mut self, zebra_db: &ZebraDb, anchor: &Root)
Deletes the given Sprout note commitment tree anchor
.
sourcepub fn create_sapling_tree(
&mut self,
zebra_db: &ZebraDb,
height: &Height,
tree: &NoteCommitmentTree,
)
pub fn create_sapling_tree( &mut self, zebra_db: &ZebraDb, height: &Height, tree: &NoteCommitmentTree, )
Inserts or overwrites the Sapling note commitment tree at the given Height
,
and the Sapling anchors.
sourcepub fn insert_sapling_subtree(
&mut self,
zebra_db: &ZebraDb,
subtree: &NoteCommitmentSubtree<Node>,
)
pub fn insert_sapling_subtree( &mut self, zebra_db: &ZebraDb, subtree: &NoteCommitmentSubtree<Node>, )
Inserts the Sapling note commitment subtree into the batch.
sourcepub fn delete_sapling_tree(&mut self, zebra_db: &ZebraDb, height: &Height)
pub fn delete_sapling_tree(&mut self, zebra_db: &ZebraDb, height: &Height)
Deletes the Sapling note commitment tree at the given Height
.
sourcepub fn delete_range_sapling_tree(
&mut self,
zebra_db: &ZebraDb,
from: &Height,
to: &Height,
)
pub fn delete_range_sapling_tree( &mut self, zebra_db: &ZebraDb, from: &Height, to: &Height, )
Deletes the range of Sapling note commitment trees at the given Height
s.
Doesn’t delete anchors from the anchor index. Doesn’t delete the upper bound.
sourcepub fn delete_sapling_anchor(&mut self, zebra_db: &ZebraDb, anchor: &Root)
pub fn delete_sapling_anchor(&mut self, zebra_db: &ZebraDb, anchor: &Root)
Deletes the given Sapling note commitment tree anchor
.
sourcepub fn delete_range_sapling_subtree(
&mut self,
zebra_db: &ZebraDb,
from: NoteCommitmentSubtreeIndex,
to: NoteCommitmentSubtreeIndex,
)
pub fn delete_range_sapling_subtree( &mut self, zebra_db: &ZebraDb, from: NoteCommitmentSubtreeIndex, to: NoteCommitmentSubtreeIndex, )
Deletes the range of Sapling subtrees at the given NoteCommitmentSubtreeIndex
es.
Doesn’t delete the upper bound.
sourcepub fn create_orchard_tree(
&mut self,
zebra_db: &ZebraDb,
height: &Height,
tree: &NoteCommitmentTree,
)
pub fn create_orchard_tree( &mut self, zebra_db: &ZebraDb, height: &Height, tree: &NoteCommitmentTree, )
Inserts or overwrites the Orchard note commitment tree at the given Height
,
and the Orchard anchors.
sourcepub fn insert_orchard_subtree(
&mut self,
zebra_db: &ZebraDb,
subtree: &NoteCommitmentSubtree<Node>,
)
pub fn insert_orchard_subtree( &mut self, zebra_db: &ZebraDb, subtree: &NoteCommitmentSubtree<Node>, )
Inserts the Orchard note commitment subtree into the batch.
sourcepub fn delete_orchard_tree(&mut self, zebra_db: &ZebraDb, height: &Height)
pub fn delete_orchard_tree(&mut self, zebra_db: &ZebraDb, height: &Height)
Deletes the Orchard note commitment tree at the given Height
.
sourcepub fn delete_range_orchard_tree(
&mut self,
zebra_db: &ZebraDb,
from: &Height,
to: &Height,
)
pub fn delete_range_orchard_tree( &mut self, zebra_db: &ZebraDb, from: &Height, to: &Height, )
Deletes the range of Orchard note commitment trees at the given Height
s.
Doesn’t delete anchors from the anchor index. Doesn’t delete the upper bound.
sourcepub fn delete_orchard_anchor(&mut self, zebra_db: &ZebraDb, anchor: &Root)
pub fn delete_orchard_anchor(&mut self, zebra_db: &ZebraDb, anchor: &Root)
Deletes the given Orchard note commitment tree anchor
.
sourcepub fn delete_range_orchard_subtree(
&mut self,
zebra_db: &ZebraDb,
from: NoteCommitmentSubtreeIndex,
to: NoteCommitmentSubtreeIndex,
)
pub fn delete_range_orchard_subtree( &mut self, zebra_db: &ZebraDb, from: NoteCommitmentSubtreeIndex, to: NoteCommitmentSubtreeIndex, )
Deletes the range of Orchard subtrees at the given NoteCommitmentSubtreeIndex
es.
Doesn’t delete the upper bound.
source§impl DiskWriteBatch
impl DiskWriteBatch
sourcepub fn prepare_transparent_transaction_batch(
&mut self,
db: &DiskDb,
network: &Network,
finalized: &FinalizedBlock,
new_outputs_by_out_loc: &BTreeMap<OutputLocation, Utxo>,
spent_utxos_by_outpoint: &HashMap<OutPoint, Utxo>,
spent_utxos_by_out_loc: &BTreeMap<OutputLocation, Utxo>,
address_balances: HashMap<Address, AddressBalanceLocation>,
) -> Result<(), BoxError>
pub fn prepare_transparent_transaction_batch( &mut self, db: &DiskDb, network: &Network, finalized: &FinalizedBlock, new_outputs_by_out_loc: &BTreeMap<OutputLocation, Utxo>, spent_utxos_by_outpoint: &HashMap<OutPoint, Utxo>, spent_utxos_by_out_loc: &BTreeMap<OutputLocation, Utxo>, address_balances: HashMap<Address, AddressBalanceLocation>, ) -> Result<(), BoxError>
Prepare a database batch containing finalized.block
’s transparent transaction indexes,
and return it (without actually writing anything).
If this method returns an error, it will be propagated, and the batch should not be written to the database.
§Errors
- Propagates any errors from updating note commitment trees
sourcepub fn prepare_new_transparent_outputs_batch(
&mut self,
db: &DiskDb,
network: &Network,
new_outputs_by_out_loc: &BTreeMap<OutputLocation, Utxo>,
address_balances: &mut HashMap<Address, AddressBalanceLocation>,
) -> Result<(), BoxError>
pub fn prepare_new_transparent_outputs_batch( &mut self, db: &DiskDb, network: &Network, new_outputs_by_out_loc: &BTreeMap<OutputLocation, Utxo>, address_balances: &mut HashMap<Address, AddressBalanceLocation>, ) -> Result<(), BoxError>
Prepare a database batch for the new UTXOs in new_outputs_by_out_loc
.
Adds the following changes to this batch:
- insert created UTXOs,
- insert transparent address UTXO index entries, and
- insert transparent address transaction entries,
without actually writing anything.
Also modifies the address_balances
for these new UTXOs.
§Errors
- This method doesn’t currently return any errors, but it might in future
sourcepub fn prepare_spent_transparent_outputs_batch(
&mut self,
db: &DiskDb,
network: &Network,
spent_utxos_by_out_loc: &BTreeMap<OutputLocation, Utxo>,
address_balances: &mut HashMap<Address, AddressBalanceLocation>,
) -> Result<(), BoxError>
pub fn prepare_spent_transparent_outputs_batch( &mut self, db: &DiskDb, network: &Network, spent_utxos_by_out_loc: &BTreeMap<OutputLocation, Utxo>, address_balances: &mut HashMap<Address, AddressBalanceLocation>, ) -> Result<(), BoxError>
Prepare a database batch for the spent outputs in spent_utxos_by_out_loc
.
Adds the following changes to this batch:
- delete spent UTXOs, and
- delete transparent address UTXO index entries,
without actually writing anything.
Also modifies the address_balances
for these new UTXOs.
§Errors
- This method doesn’t currently return any errors, but it might in future
sourcepub fn prepare_spending_transparent_tx_ids_batch(
&mut self,
db: &DiskDb,
network: &Network,
spending_tx_location: TransactionLocation,
transaction: &Transaction,
spent_utxos_by_outpoint: &HashMap<OutPoint, Utxo>,
address_balances: &HashMap<Address, AddressBalanceLocation>,
) -> Result<(), BoxError>
pub fn prepare_spending_transparent_tx_ids_batch( &mut self, db: &DiskDb, network: &Network, spending_tx_location: TransactionLocation, transaction: &Transaction, spent_utxos_by_outpoint: &HashMap<OutPoint, Utxo>, address_balances: &HashMap<Address, AddressBalanceLocation>, ) -> Result<(), BoxError>
Prepare a database batch indexing the transparent addresses that spent in this transaction.
Adds the following changes to this batch:
- index spending transactions for each spent transparent output (this is different from the transaction that created the output),
without actually writing anything.
§Errors
- This method doesn’t currently return any errors, but it might in future
sourcepub fn prepare_transparent_balances_batch(
&mut self,
db: &DiskDb,
address_balances: HashMap<Address, AddressBalanceLocation>,
) -> Result<(), BoxError>
pub fn prepare_transparent_balances_batch( &mut self, db: &DiskDb, address_balances: HashMap<Address, AddressBalanceLocation>, ) -> Result<(), BoxError>
Prepare a database batch containing finalized.block
’s:
- transparent address balance changes,
and return it (without actually writing anything).
§Errors
- This method doesn’t currently return any errors, but it might in future
Trait Implementations§
source§impl Debug for DiskWriteBatch
impl Debug for DiskWriteBatch
source§impl Default for DiskWriteBatch
impl Default for DiskWriteBatch
source§fn default() -> DiskWriteBatch
fn default() -> DiskWriteBatch
source§impl PartialEq for DiskWriteBatch
impl PartialEq for DiskWriteBatch
source§impl WriteDisk for DiskWriteBatch
impl WriteDisk for DiskWriteBatch
§Deprecation
These impls should not be used in new code, use WriteTypedBatch
instead.
impl Eq for DiskWriteBatch
Auto Trait Implementations§
impl Freeze for DiskWriteBatch
impl RefUnwindSafe for DiskWriteBatch
impl Send for DiskWriteBatch
impl !Sync for DiskWriteBatch
impl Unpin for DiskWriteBatch
impl UnwindSafe for DiskWriteBatch
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 Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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<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<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
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.