pub struct Starknet {
pub latest_state: StarknetState,
pub pre_confirmed_state: StarknetState,
pub transactions: StarknetTransactions,
pub config: StarknetConfig,
pub pre_confirmed_block_timestamp_shift: i64,
pub next_block_timestamp: Option<u64>,
pub next_block_gas: GasModification,
/* private fields */
}Fields§
§latest_state: StarknetState§pre_confirmed_state: StarknetState§transactions: StarknetTransactions§config: StarknetConfig§pre_confirmed_block_timestamp_shift: i64§next_block_timestamp: Option<u64>§next_block_gas: GasModificationImplementations§
Source§impl Starknet
impl Starknet
Sourcepub async fn configure_messaging(
&mut self,
rpc_url: &str,
contract_address: Option<&str>,
deployer_account_private_key: Option<&str>,
) -> DevnetResult<String>
pub async fn configure_messaging( &mut self, rpc_url: &str, contract_address: Option<&str>, deployer_account_private_key: Option<&str>, ) -> DevnetResult<String>
Configures the messaging from the given L1 node parameters. Calling this function multiple time will overwrite the previous configuration, if any.
§Arguments
rpc_url- The L1 node RPC URL.contract_address- The messaging contract address deployed on L1 node.deployer_account_private_key- The private key of the funded account on L1 node to perform the role of signer.
Sourcepub fn get_ethereum_url(&self) -> Option<String>
pub fn get_ethereum_url(&self) -> Option<String>
Retrieves the ethereum node URL, if configured.
Sourcepub fn set_latest_local_block(&mut self, latest_local_block: u64)
pub fn set_latest_local_block(&mut self, latest_local_block: u64)
Sets the latest local block processed by messaging.
Sourcepub async fn collect_messages_to_l1(&mut self) -> DevnetResult<Vec<MessageToL1>>
pub async fn collect_messages_to_l1(&mut self) -> DevnetResult<Vec<MessageToL1>>
Collects all messages found between the current messaging latest block and the Latest Starknet block, including both blocks. This function register the messages in two fashions:
- Add each message to the
l2_to_l1_messages_to_flush. - Increment the counter for the hash of each message into
l2_to_l1_messages_hashes.
Returns all the messages currently collected and not flushed.
Sourcepub async fn send_messages_to_l1(&mut self) -> DevnetResult<Vec<MessageToL1>>
pub async fn send_messages_to_l1(&mut self) -> DevnetResult<Vec<MessageToL1>>
Sends (flush) all the messages in l2_to_l1_messages_to_flush to L1 node.
Returns the list of sent messages.
Sourcepub async fn consume_l2_to_l1_message(
&mut self,
message: &MessageToL1,
) -> DevnetResult<Hash256>
pub async fn consume_l2_to_l1_message( &mut self, message: &MessageToL1, ) -> DevnetResult<Hash256>
Consumes a MessageToL1 that is registered in l2_to_l1_messages.
If the count related to the message is hash is already 0, an error is returned,
the message’s hash otherwise.
§Arguments
message- The message to consume.
Sourcepub async fn fetch_messages_to_l2(&mut self) -> DevnetResult<Vec<MessageToL2>>
pub async fn fetch_messages_to_l2(&mut self) -> DevnetResult<Vec<MessageToL2>>
Fetches all messages from L1 and converts the ethereum log into MessageToL2.
Source§impl Starknet
impl Starknet
pub fn new(config: &StarknetConfig) -> DevnetResult<Self>
pub fn get_state(&mut self) -> &mut StarknetState
pub fn restart(&mut self, restart_l1_to_l2_messaging: bool) -> DevnetResult<()>
pub fn get_predeployed_accounts(&self) -> Vec<Account>
Sourcepub fn commit_diff(&mut self) -> DevnetResult<StateDiff>
pub fn commit_diff(&mut self) -> DevnetResult<StateDiff>
Commits the changes since the last commit. Use it to commit the changes generated by the
last tx. Updates the pre_confirmed_state_diff to accumulate the changes since the last
block. Check StarknetState::commit_diff for more info.
pub fn get_class_hash_at( &mut self, block_id: &CustomBlockId, contract_address: ContractAddress, ) -> DevnetResult<ClassHash>
pub fn get_class( &self, block_id: &CustomBlockId, class_hash: ClassHash, ) -> DevnetResult<ContractClass>
pub fn get_class_at( &mut self, block_id: &CustomBlockId, contract_address: ContractAddress, ) -> DevnetResult<ContractClass>
pub fn get_compiled_casm( &self, class_hash: ClassHash, ) -> DevnetResult<CasmContractClass>
pub fn call( &mut self, block_id: &CustomBlockId, contract_address: Felt, entrypoint_selector: Felt, calldata: Vec<Felt>, ) -> DevnetResult<Vec<Felt>>
pub fn estimate_fee( &mut self, block_id: &CustomBlockId, transactions: &[BroadcastedTransaction], simulation_flags: &[SimulationFlag], ) -> DevnetResult<Vec<FeeEstimateWrapper>>
pub fn estimate_message_fee( &mut self, block_id: &CustomBlockId, message: MsgFromL1, ) -> DevnetResult<FeeEstimateWrapper>
pub fn add_declare_transaction( &mut self, declare_transaction: BroadcastedDeclareTransaction, ) -> DevnetResult<(TransactionHash, ClassHash)>
pub fn add_deploy_account_transaction( &mut self, deploy_account_transaction: BroadcastedDeployAccountTransaction, ) -> DevnetResult<(TransactionHash, ContractAddress)>
pub fn add_invoke_transaction( &mut self, invoke_transaction: BroadcastedInvokeTransaction, ) -> DevnetResult<TransactionHash>
pub fn add_l1_handler_transaction( &mut self, l1_handler_transaction: L1HandlerTransaction, ) -> DevnetResult<TransactionHash>
Sourcepub async fn mint(
&mut self,
fundable_address: ContractAddress,
amount: BigUint,
erc20_address: ContractAddress,
) -> DevnetResult<Felt>
pub async fn mint( &mut self, fundable_address: ContractAddress, amount: BigUint, erc20_address: ContractAddress, ) -> DevnetResult<Felt>
Creates an invoke tx for minting, using the chargeable account. Uses permissioned_mint function of the ERC20 contract
pub fn block_state_update( &self, block_id: &CustomBlockId, ) -> DevnetResult<StateUpdateResult>
pub fn set_next_block_gas( &mut self, gas_prices: GasModificationRequest, ) -> DevnetResult<GasModification>
pub fn abort_blocks( &mut self, starting_block_id: CustomBlockId, ) -> DevnetResult<Vec<TransactionHash>>
pub fn last_aborted_block_hash(&self) -> Option<&BlockHash>
pub fn accept_on_l1( &mut self, block_id: CustomBlockId, ) -> DevnetResult<Vec<BlockHash>>
pub fn get_block_txs_count(&self, block_id: &CustomBlockId) -> DevnetResult<u64>
pub fn contract_nonce_at_block( &mut self, block_id: &CustomBlockId, contract_address: ContractAddress, ) -> DevnetResult<Felt>
pub fn contract_storage_at_block( &mut self, block_id: &CustomBlockId, contract_address: ContractAddress, storage_key: PatriciaKey, ) -> DevnetResult<Felt>
pub fn get_block( &self, block_id: &CustomBlockId, ) -> DevnetResult<&StarknetBlock>
pub fn get_block_with_transactions( &self, block_id: &CustomBlockId, ) -> DevnetResult<BlockResult>
pub fn get_block_with_receipts( &self, block_id: &CustomBlockId, ) -> DevnetResult<BlockResult>
pub fn get_transaction_by_block_id_and_index( &self, block_id: &CustomBlockId, index: u64, ) -> DevnetResult<&TransactionWithHash>
pub fn get_latest_block(&self) -> DevnetResult<StarknetBlock>
pub fn get_transaction_by_hash( &self, transaction_hash: Felt, ) -> DevnetResult<&TransactionWithHash>
pub fn get_unlimited_events( &self, from_block: Option<CustomBlockId>, to_block: Option<CustomBlockId>, address: Option<ContractAddress>, keys: Option<Vec<Vec<Felt>>>, finality_status_filter: Option<TransactionFinalityStatus>, ) -> DevnetResult<Vec<EmittedEvent>>
pub fn get_events( &self, from_block: Option<CustomBlockId>, to_block: Option<CustomBlockId>, address: Option<ContractAddress>, keys: Option<Vec<Vec<Felt>>>, finality_status_filter: Option<TransactionFinalityStatus>, skip: u64, limit: Option<u64>, ) -> DevnetResult<(Vec<EmittedEvent>, bool)>
pub fn get_transaction_receipt_by_hash( &self, transaction_hash: &TransactionHash, ) -> DevnetResult<TransactionReceipt>
pub fn get_transaction_trace_by_hash( &self, transaction_hash: TransactionHash, ) -> DevnetResult<TransactionTrace>
pub fn get_transaction_traces_from_block( &self, block_id: &CustomBlockId, ) -> DevnetResult<Vec<BlockTransactionTrace>>
pub fn get_transaction_execution_and_finality_status( &self, transaction_hash: TransactionHash, ) -> DevnetResult<TransactionStatus>
pub fn simulate_transactions( &mut self, block_id: &CustomBlockId, transactions: &[BroadcastedTransaction], simulation_flags: Vec<SimulationFlag>, ) -> DevnetResult<Vec<SimulatedTransaction>>
Sourcepub fn create_block(&mut self) -> DevnetResult<(), Error>
pub fn create_block(&mut self) -> DevnetResult<(), Error>
create new block from pre_confirmed one
pub fn set_time( &mut self, timestamp: u64, create_block: bool, ) -> DevnetResult<(), Error>
pub fn increase_time(&mut self, time_shift: u64) -> DevnetResult<(), Error>
pub fn set_block_timestamp_shift(&mut self, timestamp: i64)
pub fn set_next_block_timestamp(&mut self, timestamp: u64)
pub fn get_unix_timestamp_as_seconds() -> u64
Sourcepub fn impersonate_account(
&mut self,
account: ContractAddress,
) -> DevnetResult<(), Error>
pub fn impersonate_account( &mut self, account: ContractAddress, ) -> DevnetResult<(), Error>
Impersonates account, allowing to send transactions on behalf of the account, without its private key
§Arguments
account- Account to impersonate
Sourcepub fn stop_impersonating_account(&mut self, account: &ContractAddress)
pub fn stop_impersonating_account(&mut self, account: &ContractAddress)
Stops impersonating account. After this call, the account, previously impersonated can’t be used to send transactions without its private key
§Arguments
account- Account to stop impersonating
Sourcepub fn set_auto_impersonate_account(
&mut self,
auto_impersonation: bool,
) -> DevnetResult<(), Error>
pub fn set_auto_impersonate_account( &mut self, auto_impersonation: bool, ) -> DevnetResult<(), Error>
Turn on/off auto impersonation of accounts that are not part of the state
§Arguments
auto_impersonation- If true, auto impersonate every account that is not part of the state, otherwise dont auto impersonate
pub fn get_messages_status( &self, l1_tx_hash: Hash256, ) -> Option<Vec<L1HandlerTransactionStatus>>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Starknet
impl !RefUnwindSafe for Starknet
impl Send for Starknet
impl !Sync for Starknet
impl Unpin for Starknet
impl !UnwindSafe for Starknet
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
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§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 moreSource§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 moreSource§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
Source§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
Source§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.Source§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.Source§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.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere
TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,
impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere
TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,
fn internal_rewrite(&mut self, value: &mut (T0, T1)) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere
TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,
impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere
TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,
Source§impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
fn internal_rewrite(&mut self, value: &mut Box<T>) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriterwhere
T: Clone,
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriterwhere
T: Clone,
TRewriter: SemanticRewriter<T, E>,
Source§impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
fn internal_rewrite( &mut self, value: &mut Option<T>, ) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
Source§impl<K, V, E, TRewriter> SemanticRewriter<OrderedHashMap<K, V>, E> for TRewriter
impl<K, V, E, TRewriter> SemanticRewriter<OrderedHashMap<K, V>, E> for TRewriter
fn internal_rewrite( &mut self, value: &mut OrderedHashMap<K, V>, ) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
fn internal_rewrite( &mut self, value: &mut Result<T, E2>, ) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
Source§impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriterwhere
T: Clone,
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriterwhere
T: Clone,
TRewriter: SemanticRewriter<T, E>,
fn internal_rewrite(&mut self, value: &mut Vec<T>) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
Source§impl<T, E, TRewriter> SemanticRewriter<VecDeque<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<VecDeque<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
fn internal_rewrite( &mut self, value: &mut VecDeque<T>, ) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T> Tap for T
impl<T> Tap for T
Source§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.