pub struct TxBuilder {Show 19 fields
pub core: TxBuilderCore,
pub protocol_params: Option<Protocol>,
pub tx_in_item: Option<TxIn>,
pub withdrawal_item: Option<Withdrawal>,
pub vote_item: Option<Vote>,
pub mint_item: Option<MintItem>,
pub collateral_item: Option<PubKeyTxIn>,
pub tx_output: Option<Output>,
pub adding_script_input: Option<LanguageVersion>,
pub adding_plutus_mint: Option<LanguageVersion>,
pub adding_plutus_withdrawal: Option<LanguageVersion>,
pub adding_plutus_vote: Option<LanguageVersion>,
pub fetcher: Option<Box<dyn Fetcher>>,
pub evaluator: Option<Box<dyn Evaluator>>,
pub submitter: Option<Box<dyn Submitter>>,
pub extra_inputs: Vec<UTxO>,
pub selection_threshold: u64,
pub chained_txs: Vec<String>,
pub inputs_for_evaluation: HashMap<String, UTxO>,
}
Fields§
§core: TxBuilderCore
§protocol_params: Option<Protocol>
§tx_in_item: Option<TxIn>
§withdrawal_item: Option<Withdrawal>
§vote_item: Option<Vote>
§mint_item: Option<MintItem>
§collateral_item: Option<PubKeyTxIn>
§tx_output: Option<Output>
§adding_script_input: Option<LanguageVersion>
§adding_plutus_mint: Option<LanguageVersion>
§adding_plutus_withdrawal: Option<LanguageVersion>
§adding_plutus_vote: Option<LanguageVersion>
§fetcher: Option<Box<dyn Fetcher>>
§evaluator: Option<Box<dyn Evaluator>>
§submitter: Option<Box<dyn Submitter>>
§extra_inputs: Vec<UTxO>
§selection_threshold: u64
§chained_txs: Vec<String>
§inputs_for_evaluation: HashMap<String, UTxO>
Implementations§
source§impl TxBuilder
impl TxBuilder
sourcepub fn register_pool_certificate(
&mut self,
pool_params: &PoolParams,
) -> &mut Self
pub fn register_pool_certificate( &mut self, pool_params: &PoolParams, ) -> &mut Self
sourcepub fn register_stake_certificate(
&mut self,
stake_key_address: &str,
) -> &mut Self
pub fn register_stake_certificate( &mut self, stake_key_address: &str, ) -> &mut Self
sourcepub fn delegate_stake_certificate(
&mut self,
stake_key_address: &str,
pool_id: &str,
) -> &mut Self
pub fn delegate_stake_certificate( &mut self, stake_key_address: &str, pool_id: &str, ) -> &mut Self
sourcepub fn deregister_stake_certificate(
&mut self,
stake_key_address: &str,
) -> &mut Self
pub fn deregister_stake_certificate( &mut self, stake_key_address: &str, ) -> &mut Self
sourcepub fn retire_pool_certificate(
&mut self,
pool_id: &str,
epoch: u32,
) -> &mut Self
pub fn retire_pool_certificate( &mut self, pool_id: &str, epoch: u32, ) -> &mut Self
sourcepub fn vote_delegation_certificate(
&mut self,
stake_key_address: &str,
drep: &DRep,
) -> &mut Self
pub fn vote_delegation_certificate( &mut self, stake_key_address: &str, drep: &DRep, ) -> &mut Self
sourcepub fn stake_and_vote_delegation_certificate(
&mut self,
stake_key_address: &str,
pool_key_hash: &str,
drep: &DRep,
) -> &mut Self
pub fn stake_and_vote_delegation_certificate( &mut self, stake_key_address: &str, pool_key_hash: &str, drep: &DRep, ) -> &mut Self
§Transaction building method
Add a stake and vote delegation certificate to the TxBuilder instance
§Arguments
stake_key_address
- Address of the stake keypool_key_hash
- Hash of pool key that will be delegated to, same as pool iddrep
- The drep that will be voted for, or always abstain / always no confidence
§Returns
Self
- The TxBuilder instance
sourcepub fn stake_registration_and_delegation(
&mut self,
stake_key_address: &str,
pool_key_hash: &str,
coin: u64,
) -> &mut Self
pub fn stake_registration_and_delegation( &mut self, stake_key_address: &str, pool_key_hash: &str, coin: u64, ) -> &mut Self
§Transaction building method
Add a stake registration and delegation certificate to the TxBuilder instance
§Arguments
stake_key_address
- Address of the stake keypool_key_hash
- Hash of pool key that will be delegated to, same as pool idcoin
- Deposit for certificate registration
§Returns
Self
- The TxBuilder instance
sourcepub fn vote_registration_and_delegation(
&mut self,
stake_key_address: &str,
drep: &DRep,
coin: u64,
) -> &mut Self
pub fn vote_registration_and_delegation( &mut self, stake_key_address: &str, drep: &DRep, coin: u64, ) -> &mut Self
§Transaction building method
Add a vote registration and delegation certificate to the TxBuilder instance
§Arguments
stake_key_address
- Address of the stake keydrep
- The drep that will be voted for, or always abstain / always no confidencecoin
- Deposit for certificate registration
§Returns
Self
- The TxBuilder instance
sourcepub fn stake_vote_registration_and_delegation(
&mut self,
stake_key_address: &str,
pool_key_hash: &str,
drep: &DRep,
coin: u64,
) -> &mut Self
pub fn stake_vote_registration_and_delegation( &mut self, stake_key_address: &str, pool_key_hash: &str, drep: &DRep, coin: u64, ) -> &mut Self
§Transaction building method
Add a stake vote registration and delegation certificate to the TxBuilder instance
§Arguments
stake_key_address
- Address of the stake keypool_key_hash
- Hash of pool key that will be delegated to, same as pool iddrep
- The drep that will be voted for, or always abstain / always no confidencecoin
- Deposit for certificate registration
§Returns
Self
- The TxBuilder instance
sourcepub fn committee_hot_auth(
&mut self,
committee_cold_key_address: &str,
committee_hot_key_address: &str,
) -> &mut Self
pub fn committee_hot_auth( &mut self, committee_cold_key_address: &str, committee_hot_key_address: &str, ) -> &mut Self
sourcepub fn commitee_cold_resign(
&mut self,
committee_cold_key_address: &str,
anchor: Option<Anchor>,
) -> &mut Self
pub fn commitee_cold_resign( &mut self, committee_cold_key_address: &str, anchor: Option<Anchor>, ) -> &mut Self
sourcepub fn drep_registration(
&mut self,
drep_id: &str,
coin: u64,
anchor: Option<Anchor>,
) -> &mut Self
pub fn drep_registration( &mut self, drep_id: &str, coin: u64, anchor: Option<Anchor>, ) -> &mut Self
sourcepub fn drep_deregistration(&mut self, drep_id: &str, coin: u64) -> &mut Self
pub fn drep_deregistration(&mut self, drep_id: &str, coin: u64) -> &mut Self
sourcepub fn drep_update(
&mut self,
drep_id: &str,
anchor: Option<Anchor>,
) -> &mut Self
pub fn drep_update( &mut self, drep_id: &str, anchor: Option<Anchor>, ) -> &mut Self
sourcepub fn certificate_script(
&mut self,
script_cbor: &str,
version: Option<LanguageVersion>,
) -> &mut Self
pub fn certificate_script( &mut self, script_cbor: &str, version: Option<LanguageVersion>, ) -> &mut Self
sourcepub fn certificate_tx_in_reference(
&mut self,
tx_hash: &str,
tx_index: u32,
script_hash: &str,
version: Option<LanguageVersion>,
script_size: usize,
) -> &mut Self
pub fn certificate_tx_in_reference( &mut self, tx_hash: &str, tx_index: u32, script_hash: &str, version: Option<LanguageVersion>, script_size: usize, ) -> &mut Self
§Transaction building method
Add a Certificate transaction input reference to the TxBuilder instance
§Arguments
tx_hash
- The transaction hashtx_index
- The transaction indexscript_hash
- The script hashversion
- The language version, if the language version is None, the script is assumed to be a Native Scriptscript_size
- Size of the script
§Returns
Self
- The TxBuilder instance
source§impl TxBuilder
impl TxBuilder
sourcepub async fn complete(
&mut self,
customized_tx: Option<TxBuilderBody>,
) -> Result<&mut Self, JsError>
pub async fn complete( &mut self, customized_tx: Option<TxBuilderBody>, ) -> Result<&mut Self, JsError>
sourcepub fn complete_sync(
&mut self,
customized_tx: Option<TxBuilderBody>,
) -> Result<&mut Self, JsError>
pub fn complete_sync( &mut self, customized_tx: Option<TxBuilderBody>, ) -> Result<&mut Self, JsError>
sourcepub fn complete_signing(&mut self) -> Result<String, JsError>
pub fn complete_signing(&mut self) -> Result<String, JsError>
source§impl TxBuilder
impl TxBuilder
sourcepub fn mint_plutus_script(
&mut self,
language_version: &LanguageVersion,
) -> &mut Self
pub fn mint_plutus_script( &mut self, language_version: &LanguageVersion, ) -> &mut Self
sourcepub fn mint_plutus_script_v1(&mut self) -> &mut Self
pub fn mint_plutus_script_v1(&mut self) -> &mut Self
sourcepub fn mint_plutus_script_v2(&mut self) -> &mut Self
pub fn mint_plutus_script_v2(&mut self) -> &mut Self
sourcepub fn mint_plutus_script_v3(&mut self) -> &mut Self
pub fn mint_plutus_script_v3(&mut self) -> &mut Self
sourcepub fn minting_script(&mut self, script_cbor: &str) -> &mut Self
pub fn minting_script(&mut self, script_cbor: &str) -> &mut Self
sourcepub fn mint_tx_in_reference(
&mut self,
tx_hash: &str,
tx_index: u32,
script_hash: &str,
script_size: usize,
) -> &mut Self
pub fn mint_tx_in_reference( &mut self, tx_hash: &str, tx_index: u32, script_hash: &str, script_size: usize, ) -> &mut Self
§Transaction building method
Add a minting transaction input reference to the TxBuilder instance
§Arguments
tx_hash
- The transaction hashtx_index
- The transaction indexscript_hash
- The script hashversion
- The language version, if the language version is None, the script is assumed to be a Native Scriptscript_size
- Size of the script
§Returns
Self
- The TxBuilder instance
sourcepub fn mint_redeemer_value(&mut self, redeemer: &WRedeemer) -> &mut Self
pub fn mint_redeemer_value(&mut self, redeemer: &WRedeemer) -> &mut Self
source§impl TxBuilder
impl TxBuilder
pub fn set_evaluator(&mut self, evaluator: Box<dyn Evaluator>) -> &mut Self
source§impl TxBuilder
impl TxBuilder
sourcepub fn spending_plutus_script(
&mut self,
language_version: &LanguageVersion,
) -> &mut Self
pub fn spending_plutus_script( &mut self, language_version: &LanguageVersion, ) -> &mut Self
sourcepub fn spending_plutus_script_v1(&mut self) -> &mut Self
pub fn spending_plutus_script_v1(&mut self) -> &mut Self
sourcepub fn spending_plutus_script_v2(&mut self) -> &mut Self
pub fn spending_plutus_script_v2(&mut self) -> &mut Self
sourcepub fn spending_plutus_script_v3(&mut self) -> &mut Self
pub fn spending_plutus_script_v3(&mut self) -> &mut Self
sourcepub fn tx_in(
&mut self,
tx_hash: &str,
tx_index: u32,
amount: &[Asset],
address: &str,
) -> &mut Self
pub fn tx_in( &mut self, tx_hash: &str, tx_index: u32, amount: &[Asset], address: &str, ) -> &mut Self
sourcepub fn tx_in_script(&mut self, script_cbor: &str) -> &mut Self
pub fn tx_in_script(&mut self, script_cbor: &str) -> &mut Self
sourcepub fn tx_in_datum_value(&mut self, data: &WData) -> &mut Self
pub fn tx_in_datum_value(&mut self, data: &WData) -> &mut Self
sourcepub fn tx_in_inline_datum_present(&mut self) -> &mut Self
pub fn tx_in_inline_datum_present(&mut self) -> &mut Self
sourcepub fn tx_in_redeemer_value(&mut self, redeemer: &WRedeemer) -> &mut Self
pub fn tx_in_redeemer_value(&mut self, redeemer: &WRedeemer) -> &mut Self
sourcepub fn spending_tx_in_reference(
&mut self,
tx_hash: &str,
tx_index: u32,
script_hash: &str,
script_size: usize,
) -> &mut Self
pub fn spending_tx_in_reference( &mut self, tx_hash: &str, tx_index: u32, script_hash: &str, script_size: usize, ) -> &mut Self
sourcepub fn spending_reference_tx_in_inline_datum_present(&mut self) -> &mut Self
pub fn spending_reference_tx_in_inline_datum_present(&mut self) -> &mut Self
sourcepub fn spending_reference_tx_in_redeemer_value(
&mut self,
redeemer: &WRedeemer,
) -> &mut Self
pub fn spending_reference_tx_in_redeemer_value( &mut self, redeemer: &WRedeemer, ) -> &mut Self
sourcepub fn read_only_tx_in_reference(
&mut self,
tx_hash: &str,
tx_index: u32,
script_size: Option<usize>,
) -> &mut Self
pub fn read_only_tx_in_reference( &mut self, tx_hash: &str, tx_index: u32, script_size: Option<usize>, ) -> &mut Self
§Transaction building method
Add a read-only transaction input reference to the TxBuilder instance
§Arguments
tx_hash
- The transaction hashtx_index
- The transaction indexscript_size
- The size of the script contained at the reference input (None if it doesn’t contain a script)
§Returns
Self
- The TxBuilder instance
source§impl TxBuilder
impl TxBuilder
sourcepub fn tx_out_datum_hash_value(&mut self, data: &WData) -> &mut Self
pub fn tx_out_datum_hash_value(&mut self, data: &WData) -> &mut Self
sourcepub fn tx_out_datum_embed_value(&mut self, data: &WData) -> &mut Self
pub fn tx_out_datum_embed_value(&mut self, data: &WData) -> &mut Self
sourcepub fn tx_out_inline_datum_value(&mut self, data: &WData) -> &mut Self
pub fn tx_out_inline_datum_value(&mut self, data: &WData) -> &mut Self
sourcepub fn tx_out_reference_script(
&mut self,
script_cbor: &str,
version: Option<LanguageVersion>,
) -> &mut Self
pub fn tx_out_reference_script( &mut self, script_cbor: &str, version: Option<LanguageVersion>, ) -> &mut Self
source§impl TxBuilder
impl TxBuilder
sourcepub fn voting_plutus_script(
&mut self,
language_version: &LanguageVersion,
) -> &mut Self
pub fn voting_plutus_script( &mut self, language_version: &LanguageVersion, ) -> &mut Self
sourcepub fn voting_plutus_script_v1(&mut self) -> &mut Self
pub fn voting_plutus_script_v1(&mut self) -> &mut Self
sourcepub fn voting_plutus_script_v2(&mut self) -> &mut Self
pub fn voting_plutus_script_v2(&mut self) -> &mut Self
sourcepub fn voting_plutus_script_v3(&mut self) -> &mut Self
pub fn voting_plutus_script_v3(&mut self) -> &mut Self
sourcepub fn vote_tx_in_reference(
&mut self,
tx_hash: &str,
tx_index: u32,
vote_script_hash: &str,
script_size: usize,
) -> &mut Self
pub fn vote_tx_in_reference( &mut self, tx_hash: &str, tx_index: u32, vote_script_hash: &str, script_size: usize, ) -> &mut Self
§Transaction building method
Add a vote reference to the TxBuilder instance
§Arguments
tx_hash
- The transaction hashtx_index
- The transaction indexvote_script_hash
- The vote script hashversion
- The language version, if the language version is None, the script is assumed to be a Native Scriptscript_size
- Size of the script
§Returns
Self
- The TxBuilder instance
sourcepub fn vote(
&mut self,
voter: &Voter,
gov_action_id: &RefTxIn,
voting_procedure: &VotingProcedure,
) -> &mut Self
pub fn vote( &mut self, voter: &Voter, gov_action_id: &RefTxIn, voting_procedure: &VotingProcedure, ) -> &mut Self
§Transaction building method
Add a vote in the TxBuilder instance
§Arguments
voter
- The voter, can be a ConstitutionalCommittee, a DRep or a StakePoolgov_action_id
- The transaction hash and transaction id of the governance actionvoting_precedure
- The voting kind (yes, no, abstain) with an optional anchor
§Returns
Self
- The TxBuilder instance
sourcepub fn vote_script(&mut self, script_cbor: &str) -> &mut Self
pub fn vote_script(&mut self, script_cbor: &str) -> &mut Self
sourcepub fn vote_redeemer_value(&mut self, redeemer: &WRedeemer) -> &mut Self
pub fn vote_redeemer_value(&mut self, redeemer: &WRedeemer) -> &mut Self
source§impl TxBuilder
impl TxBuilder
sourcepub fn withdrawal_plutus_script(
&mut self,
language_version: &LanguageVersion,
) -> &mut Self
pub fn withdrawal_plutus_script( &mut self, language_version: &LanguageVersion, ) -> &mut Self
sourcepub fn withdrawal_plutus_script_v1(&mut self) -> &mut Self
pub fn withdrawal_plutus_script_v1(&mut self) -> &mut Self
sourcepub fn withdrawal_plutus_script_v2(&mut self) -> &mut Self
pub fn withdrawal_plutus_script_v2(&mut self) -> &mut Self
sourcepub fn withdrawal_plutus_script_v3(&mut self) -> &mut Self
pub fn withdrawal_plutus_script_v3(&mut self) -> &mut Self
sourcepub fn withdrawal_tx_in_reference(
&mut self,
tx_hash: &str,
tx_index: u32,
withdrawal_script_hash: &str,
script_size: usize,
) -> &mut Self
pub fn withdrawal_tx_in_reference( &mut self, tx_hash: &str, tx_index: u32, withdrawal_script_hash: &str, script_size: usize, ) -> &mut Self
sourcepub fn withdrawal(&mut self, stake_address: &str, coin: u64) -> &mut Self
pub fn withdrawal(&mut self, stake_address: &str, coin: u64) -> &mut Self
sourcepub fn withdrawal_script(&mut self, script_cbor: &str) -> &mut Self
pub fn withdrawal_script(&mut self, script_cbor: &str) -> &mut Self
sourcepub fn withdrawal_redeemer_value(&mut self, redeemer: &WRedeemer) -> &mut Self
pub fn withdrawal_redeemer_value(&mut self, redeemer: &WRedeemer) -> &mut Self
source§impl TxBuilder
impl TxBuilder
sourcepub fn new(param: TxBuilderParam) -> Self
pub fn new(param: TxBuilderParam) -> Self
sourcepub fn required_signer_hash(&mut self, pub_key_hash: &str) -> &mut Self
pub fn required_signer_hash(&mut self, pub_key_hash: &str) -> &mut Self
sourcepub fn change_address(&mut self, address: &str) -> &mut Self
pub fn change_address(&mut self, address: &str) -> &mut Self
sourcepub fn change_output_datum(&mut self, data: WData) -> &mut Self
pub fn change_output_datum(&mut self, data: WData) -> &mut Self
sourcepub fn invalid_before(&mut self, slot: u64) -> &mut Self
pub fn invalid_before(&mut self, slot: u64) -> &mut Self
sourcepub fn invalid_hereafter(&mut self, slot: u64) -> &mut Self
pub fn invalid_hereafter(&mut self, slot: u64) -> &mut Self
sourcepub fn metadata_value(&mut self, tag: &str, metadata: &str) -> &mut Self
pub fn metadata_value(&mut self, tag: &str, metadata: &str) -> &mut Self
sourcepub fn signing_key(&mut self, skey_hex: &str) -> &mut Self
pub fn signing_key(&mut self, skey_hex: &str) -> &mut Self
sourcepub fn input_for_evaluation(&mut self, input: &UTxO) -> &mut Self
pub fn input_for_evaluation(&mut self, input: &UTxO) -> &mut Self
sourcepub fn select_utxos_from(
&mut self,
extra_inputs: &[UTxO],
threshold: u64,
) -> &mut Self
pub fn select_utxos_from( &mut self, extra_inputs: &[UTxO], threshold: u64, ) -> &mut Self
§Transaction building method
Selects utxos to fill output value and puts them into inputs
§Arguments
inputs
- The inputs already placed into the object will remain, these extra inputs will be used to fill the remaining value neededthreshold
- Extra value needed to be selected for, usually for paying fees and min UTxO value of change output
§Returns
Self
- The TxBuilder instance
sourcepub fn network(&mut self, network: Network) -> &mut Self
pub fn network(&mut self, network: Network) -> &mut Self
§Transaction building method
Selects the network to use, primarily to decide which cost models to use for evaluation and calculating script integrity hash
§Arguments
network
- The network the current Tx is being built for. Custom Network takes in a vec of cost models
§Returns
Self
- The TxBuilder instance
sourcepub fn queue_input(&mut self)
pub fn queue_input(&mut self)
§Internal method
Queue an input in the TxBuilder instance
sourcepub fn queue_withdrawal(&mut self)
pub fn queue_withdrawal(&mut self)
§Internal method
Queue a withdrawal in the TxBuilder instance
sourcepub fn queue_vote(&mut self)
pub fn queue_vote(&mut self)
§Internal method
Queue a vote in the TxBuilder instance
sourcepub fn queue_mint(&mut self)
pub fn queue_mint(&mut self)
§Internal method
Queue a mint in the TxBuilder instance
sourcepub fn queue_all_last_item(&mut self)
pub fn queue_all_last_item(&mut self)
§Internal method
Queue all last items in the TxBuilder instance
Trait Implementations§
source§impl TxEvaluation for TxBuilder
impl TxEvaluation for TxBuilder
fn update_redeemer(&mut self, tx_evaluation: Vec<Action>) -> &mut Self
Auto Trait Implementations§
impl Freeze for TxBuilder
impl !RefUnwindSafe for TxBuilder
impl !Send for TxBuilder
impl !Sync for TxBuilder
impl Unpin for TxBuilder
impl !UnwindSafe for TxBuilder
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> 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> 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> 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> 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.