Struct Client

Source
pub struct Client { /* private fields */ }
Expand description

Client implements a JSON-RPC client for the Bitcoin Core daemon or compatible APIs.

Implementations§

Source§

impl Client

Source

pub fn new(url: &str, auth: Auth) -> Result<Client, Error>

Creates a client to a bitcoind JSON-RPC server.

Can only return Err when using cookie authentication.

Source

pub fn from_jsonrpc(client: Client) -> Client

Create a new Client using the given jsonrpc::Client.

Source

pub fn get_jsonrpc_client(&self) -> &Client

Get the underlying JSONRPC client.

Trait Implementations§

Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl RpcApi for Client

Source§

fn call<T>(&self, cmd: &str, args: &[Value]) -> Result<T, Error>
where T: for<'a> Deserialize<'a>,

Call an cmd rpc with given args list

Source§

fn get_by_id<T>(&self, id: &<T as Queryable<Self>>::Id) -> Result<T, Error>
where T: Queryable<Self>,

Query an object implementing Querable type
Source§

fn get_network_info(&self) -> Result<GetNetworkInfoResult, Error>

Source§

fn get_index_info(&self) -> Result<GetIndexInfoResult, Error>

Source§

fn version(&self) -> Result<usize, Error>

Source§

fn add_multisig_address( &self, nrequired: usize, keys: &[PubKeyOrAddress<'_>], label: Option<&str>, address_type: Option<AddressType>, ) -> Result<AddMultiSigAddressResult, Error>

Source§

fn load_wallet(&self, wallet: &str) -> Result<LoadWalletResult, Error>

Source§

fn unload_wallet( &self, wallet: Option<&str>, ) -> Result<Option<UnloadWalletResult>, Error>

Source§

fn create_wallet( &self, wallet: &str, disable_private_keys: Option<bool>, blank: Option<bool>, passphrase: Option<&str>, avoid_reuse: Option<bool>, ) -> Result<LoadWalletResult, Error>

Source§

fn list_wallets(&self) -> Result<Vec<String>, Error>

Source§

fn list_wallet_dir(&self) -> Result<Vec<String>, Error>

Source§

fn get_wallet_info(&self) -> Result<GetWalletInfoResult, Error>

Source§

fn backup_wallet(&self, destination: Option<&str>) -> Result<(), Error>

Source§

fn dump_private_key(&self, address: &Address) -> Result<PrivateKey, Error>

Source§

fn encrypt_wallet(&self, passphrase: &str) -> Result<(), Error>

Source§

fn get_difficulty(&self) -> Result<f64, Error>

Source§

fn get_connection_count(&self) -> Result<usize, Error>

Source§

fn get_block(&self, hash: &BlockHash) -> Result<Block, Error>

Source§

fn get_block_hex(&self, hash: &BlockHash) -> Result<String, Error>

Source§

fn get_block_info(&self, hash: &BlockHash) -> Result<GetBlockResult, Error>

Source§

fn get_block_header(&self, hash: &BlockHash) -> Result<Header, Error>

Source§

fn get_block_header_info( &self, hash: &BlockHash, ) -> Result<GetBlockHeaderResult, Error>

Source§

fn get_mining_info(&self) -> Result<GetMiningInfoResult, Error>

Source§

fn get_block_template( &self, mode: GetBlockTemplateModes, rules: &[GetBlockTemplateRules], capabilities: &[GetBlockTemplateCapabilities], ) -> Result<GetBlockTemplateResult, Error>

Source§

fn get_blockchain_info(&self) -> Result<GetBlockchainInfoResult, Error>

Returns a data structure containing various state info regarding blockchain processing.
Source§

fn get_block_count(&self) -> Result<u64, Error>

Returns the numbers of block in the longest chain.
Source§

fn get_best_block_hash(&self) -> Result<BlockHash, Error>

Returns the hash of the best (tip) block in the longest blockchain.
Source§

fn get_block_hash(&self, height: u64) -> Result<BlockHash, Error>

Get block hash at a given height
Source§

fn get_block_stats(&self, height: u64) -> Result<GetBlockStatsResult, Error>

Source§

fn get_block_stats_fields( &self, height: u64, fields: &[BlockStatsFields], ) -> Result<GetBlockStatsResultPartial, Error>

Source§

fn get_raw_transaction( &self, txid: &Txid, block_hash: Option<&BlockHash>, ) -> Result<Transaction, Error>

Source§

fn get_raw_transaction_hex( &self, txid: &Txid, block_hash: Option<&BlockHash>, ) -> Result<String, Error>

Source§

fn get_raw_transaction_info( &self, txid: &Txid, block_hash: Option<&BlockHash>, ) -> Result<GetRawTransactionResult, Error>

Source§

fn get_block_filter( &self, block_hash: &BlockHash, ) -> Result<GetBlockFilterResult, Error>

Source§

fn get_balance( &self, minconf: Option<usize>, include_watchonly: Option<bool>, ) -> Result<Amount, Error>

Source§

fn get_balances(&self) -> Result<GetBalancesResult, Error>

Source§

fn get_received_by_address( &self, address: &Address, minconf: Option<u32>, ) -> Result<Amount, Error>

Source§

fn get_transaction( &self, txid: &Txid, include_watchonly: Option<bool>, ) -> Result<GetTransactionResult, Error>

Source§

fn list_transactions( &self, label: Option<&str>, count: Option<usize>, skip: Option<usize>, include_watchonly: Option<bool>, ) -> Result<Vec<ListTransactionResult>, Error>

Source§

fn list_since_block( &self, blockhash: Option<&BlockHash>, target_confirmations: Option<usize>, include_watchonly: Option<bool>, include_removed: Option<bool>, ) -> Result<ListSinceBlockResult, Error>

Source§

fn get_tx_out( &self, txid: &Txid, vout: u32, include_mempool: Option<bool>, ) -> Result<Option<GetTxOutResult>, Error>

Source§

fn get_tx_out_proof( &self, txids: &[Txid], block_hash: Option<&BlockHash>, ) -> Result<Vec<u8>, Error>

Source§

fn import_public_key( &self, pubkey: &PublicKey, label: Option<&str>, rescan: Option<bool>, ) -> Result<(), Error>

Source§

fn import_private_key( &self, privkey: &PrivateKey, label: Option<&str>, rescan: Option<bool>, ) -> Result<(), Error>

Source§

fn import_address( &self, address: &Address, label: Option<&str>, rescan: Option<bool>, ) -> Result<(), Error>

Source§

fn import_address_script( &self, script: &Script, label: Option<&str>, rescan: Option<bool>, p2sh: Option<bool>, ) -> Result<(), Error>

Source§

fn import_multi( &self, requests: &[ImportMultiRequest<'_>], options: Option<&ImportMultiOptions>, ) -> Result<Vec<ImportMultiResult>, Error>

Source§

fn import_descriptors( &self, req: ImportDescriptors, ) -> Result<Vec<ImportMultiResult>, Error>

Source§

fn set_label(&self, address: &Address, label: &str) -> Result<(), Error>

Source§

fn key_pool_refill(&self, new_size: Option<usize>) -> Result<(), Error>

Source§

fn list_unspent( &self, minconf: Option<usize>, maxconf: Option<usize>, addresses: Option<&[&Address]>, include_unsafe: Option<bool>, query_options: Option<ListUnspentQueryOptions>, ) -> Result<Vec<ListUnspentResultEntry>, Error>

Source§

fn lock_unspent(&self, outputs: &[OutPoint]) -> Result<bool, Error>

To unlock, use [unlock_unspent].
Source§

fn unlock_unspent(&self, outputs: &[OutPoint]) -> Result<bool, Error>

Source§

fn unlock_unspent_all(&self) -> Result<bool, Error>

Unlock all unspent UTXOs.
Source§

fn list_received_by_address( &self, address_filter: Option<&Address>, minconf: Option<u32>, include_empty: Option<bool>, include_watchonly: Option<bool>, ) -> Result<Vec<ListReceivedByAddressResult>, Error>

Source§

fn create_psbt( &self, inputs: &[CreateRawTransactionInput], outputs: &HashMap<String, Amount>, locktime: Option<i64>, replaceable: Option<bool>, ) -> Result<String, Error>

Source§

fn create_raw_transaction_hex( &self, utxos: &[CreateRawTransactionInput], outs: &HashMap<String, Amount>, locktime: Option<i64>, replaceable: Option<bool>, ) -> Result<String, Error>

Source§

fn create_raw_transaction( &self, utxos: &[CreateRawTransactionInput], outs: &HashMap<String, Amount>, locktime: Option<i64>, replaceable: Option<bool>, ) -> Result<Transaction, Error>

Source§

fn decode_raw_transaction<R>( &self, tx: R, is_witness: Option<bool>, ) -> Result<DecodeRawTransactionResult, Error>
where R: RawTx,

Source§

fn fund_raw_transaction<R>( &self, tx: R, options: Option<&FundRawTransactionOptions>, is_witness: Option<bool>, ) -> Result<FundRawTransactionResult, Error>
where R: RawTx,

Source§

fn sign_raw_transaction<R>( &self, tx: R, utxos: Option<&[SignRawTransactionInput]>, private_keys: Option<&[PrivateKey]>, sighash_type: Option<SigHashType>, ) -> Result<SignRawTransactionResult, Error>
where R: RawTx,

👎Deprecated
Source§

fn sign_raw_transaction_with_wallet<R>( &self, tx: R, utxos: Option<&[SignRawTransactionInput]>, sighash_type: Option<SigHashType>, ) -> Result<SignRawTransactionResult, Error>
where R: RawTx,

Source§

fn sign_raw_transaction_with_key<R>( &self, tx: R, privkeys: &[PrivateKey], prevtxs: Option<&[SignRawTransactionInput]>, sighash_type: Option<SigHashType>, ) -> Result<SignRawTransactionResult, Error>
where R: RawTx,

Source§

fn test_mempool_accept<R>( &self, rawtxs: &[R], ) -> Result<Vec<TestMempoolAcceptResult>, Error>
where R: RawTx,

Source§

fn stop(&self) -> Result<String, Error>

Source§

fn verify_message( &self, address: &Address, signature: &Signature, message: &str, ) -> Result<bool, Error>

Source§

fn get_new_address( &self, label: Option<&str>, address_type: Option<AddressType>, ) -> Result<Address<NetworkUnchecked>, Error>

Generate new address under own control
Source§

fn get_raw_change_address( &self, address_type: Option<AddressType>, ) -> Result<Address<NetworkUnchecked>, Error>

Generate new address for receiving change
Source§

fn get_address_info( &self, address: &Address, ) -> Result<GetAddressInfoResult, Error>

Source§

fn generate_to_address( &self, block_num: u64, address: &Address, ) -> Result<Vec<BlockHash>, Error>

Mine block_num blocks and pay coinbase to address Read more
Source§

fn generate( &self, block_num: u64, maxtries: Option<u64>, ) -> Result<Vec<BlockHash>, Error>

Mine up to block_num blocks immediately (before the RPC call returns) to an address in the wallet.
Source§

fn invalidate_block(&self, block_hash: &BlockHash) -> Result<(), Error>

Mark a block as invalid by block_hash
Source§

fn reconsider_block(&self, block_hash: &BlockHash) -> Result<(), Error>

Mark a block as valid by block_hash
Source§

fn get_mempool_info(&self) -> Result<GetMempoolInfoResult, Error>

Returns details on the active state of the TX memory pool
Source§

fn get_raw_mempool(&self) -> Result<Vec<Txid>, Error>

Get txids of all transactions in a memory pool
Source§

fn get_raw_mempool_verbose( &self, ) -> Result<HashMap<Txid, GetMempoolEntryResult>, Error>

Get details for the transactions in a memory pool
Source§

fn get_mempool_entry(&self, txid: &Txid) -> Result<GetMempoolEntryResult, Error>

Get mempool data for given transaction
Source§

fn get_chain_tips(&self) -> Result<Vec<GetChainTipsResultTip>, Error>

Get information about all known tips in the block tree, including the main chain as well as stale branches.
Source§

fn send_to_address( &self, address: &Address, amount: Amount, comment: Option<&str>, comment_to: Option<&str>, subtract_fee: Option<bool>, replaceable: Option<bool>, confirmation_target: Option<u32>, estimate_mode: Option<EstimateMode>, ) -> Result<Txid, Error>

Source§

fn add_node(&self, addr: &str) -> Result<(), Error>

Attempts to add a node to the addnode list. Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be full nodes/support SegWit as other outbound peers are (though such peers will not be synced from).
Source§

fn remove_node(&self, addr: &str) -> Result<(), Error>

Attempts to remove a node from the addnode list.
Source§

fn onetry_node(&self, addr: &str) -> Result<(), Error>

Attempts to connect to a node without permanently adding it to the addnode list.
Source§

fn disconnect_node(&self, addr: &str) -> Result<(), Error>

Immediately disconnects from the specified peer node.
Source§

fn disconnect_node_by_id(&self, node_id: u32) -> Result<(), Error>

Source§

fn get_added_node_info( &self, node: Option<&str>, ) -> Result<Vec<GetAddedNodeInfoResult>, Error>

Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here)
Source§

fn get_node_addresses( &self, count: Option<usize>, ) -> Result<Vec<GetNodeAddressesResult>, Error>

Return known addresses which can potentially be used to find new nodes in the network
Source§

fn list_banned(&self) -> Result<Vec<ListBannedResult>, Error>

List all banned IPs/Subnets.
Source§

fn clear_banned(&self) -> Result<(), Error>

Clear all banned IPs.
Source§

fn add_ban( &self, subnet: &str, bantime: u64, absolute: bool, ) -> Result<(), Error>

Attempts to add an IP/Subnet to the banned list.
Source§

fn remove_ban(&self, subnet: &str) -> Result<(), Error>

Attempts to remove an IP/Subnet from the banned list.
Source§

fn set_network_active(&self, state: bool) -> Result<bool, Error>

Disable/enable all p2p network activity.
Source§

fn get_peer_info(&self) -> Result<Vec<GetPeerInfoResult>, Error>

Returns data about each connected network node as an array of PeerInfo
Source§

fn ping(&self) -> Result<(), Error>

Requests that a ping be sent to all other nodes, to measure ping time. Read more
Source§

fn send_raw_transaction<R>(&self, tx: R) -> Result<Txid, Error>
where R: RawTx,

Source§

fn estimate_smart_fee( &self, conf_target: u16, estimate_mode: Option<EstimateMode>, ) -> Result<EstimateSmartFeeResult, Error>

Source§

fn wait_for_new_block(&self, timeout: u64) -> Result<BlockRef, Error>

Waits for a specific new block and returns useful info about it. Returns the current block on timeout or exit. Read more
Source§

fn wait_for_block( &self, blockhash: &BlockHash, timeout: u64, ) -> Result<BlockRef, Error>

Waits for a specific new block and returns useful info about it. Returns the current block on timeout or exit. Read more
Source§

fn wallet_create_funded_psbt( &self, inputs: &[CreateRawTransactionInput], outputs: &HashMap<String, Amount>, locktime: Option<i64>, options: Option<WalletCreateFundedPsbtOptions>, bip32derivs: Option<bool>, ) -> Result<WalletCreateFundedPsbtResult, Error>

Source§

fn wallet_process_psbt( &self, psbt: &str, sign: Option<bool>, sighash_type: Option<SigHashType>, bip32derivs: Option<bool>, ) -> Result<WalletProcessPsbtResult, Error>

Source§

fn get_descriptor_info( &self, desc: &str, ) -> Result<GetDescriptorInfoResult, Error>

Source§

fn join_psbt(&self, psbts: &[String]) -> Result<String, Error>

Source§

fn combine_psbt(&self, psbts: &[String]) -> Result<String, Error>

Source§

fn combine_raw_transaction( &self, hex_strings: &[String], ) -> Result<String, Error>

Source§

fn finalize_psbt( &self, psbt: &str, extract: Option<bool>, ) -> Result<FinalizePsbtResult, Error>

Source§

fn derive_addresses( &self, descriptor: &str, range: Option<[u32; 2]>, ) -> Result<Vec<Address<NetworkUnchecked>>, Error>

Source§

fn rescan_blockchain( &self, start_from: Option<usize>, stop_height: Option<usize>, ) -> Result<(usize, Option<usize>), Error>

Source§

fn get_tx_out_set_info( &self, hash_type: Option<TxOutSetHashType>, hash_or_height: Option<HashOrHeight>, use_index: Option<bool>, ) -> Result<GetTxOutSetInfoResult, Error>

Returns statistics about the unspent transaction output set. Note this call may take some time if you are not using coinstatsindex.
Source§

fn get_net_totals(&self) -> Result<GetNetTotalsResult, Error>

Returns information about network traffic, including bytes in, bytes out, and current time.
Source§

fn get_network_hash_ps( &self, nblocks: Option<u64>, height: Option<u64>, ) -> Result<f64, Error>

Returns the estimated network hashes per second based on the last n blocks.
Source§

fn uptime(&self) -> Result<u64, Error>

Returns the total uptime of the server in seconds
Source§

fn submit_block(&self, block: &Block) -> Result<(), Error>

Submit a block
Source§

fn submit_block_bytes(&self, block_bytes: &[u8]) -> Result<(), Error>

Submit a raw block
Source§

fn submit_block_hex(&self, block_hex: &str) -> Result<(), Error>

Submit a block as a hex string
Source§

fn scan_tx_out_set_blocking( &self, descriptors: &[ScanTxOutRequest], ) -> Result<ScanTxOutResult, Error>

Source§

fn get_zmq_notifications(&self) -> Result<Vec<GetZmqNotificationsResult>, Error>

Returns information about the active ZeroMQ notifications
Source§

impl TryFrom<&Client> for Height

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from( value: &Client, ) -> Result<Height, <Height as TryFrom<&Client>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl !Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>

Change the foreground color to black
Source§

fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>

Change the background color to black
Source§

fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>

Change the foreground color to red
Source§

fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>

Change the background color to red
Source§

fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>

Change the foreground color to green
Source§

fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>

Change the background color to green
Source§

fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>

Change the background color to yellow
Source§

fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>

Change the background color to blue
Source§

fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>

Change the background color to magenta
Source§

fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>

Change the background color to purple
Source§

fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>

Change the background color to cyan
Source§

fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>

Change the foreground color to white
Source§

fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>

Change the background color to white
Source§

fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>

Make the text bold
Source§

fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>

Make the text dim
Source§

fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>

Make the text italicized
Source§

fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>

Make the text italicized
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>

Swap the foreground and background colors
Source§

fn hidden<'a>(&'a self) -> HiddenDisplay<'a, Self>

Hide the text
Source§

fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,