pub struct SurfnetSvmLocker(pub Arc<RwLock<SurfnetSvm>>);Tuple Fields§
§0: Arc<RwLock<SurfnetSvm>>Implementations§
Source§impl SurfnetSvmLocker
Functions for reading and writing to the underlying SurfnetSvm instance
impl SurfnetSvmLocker
Functions for reading and writing to the underlying SurfnetSvm instance
Sourcepub fn with_svm_reader<T, F>(&self, reader: F) -> T
pub fn with_svm_reader<T, F>(&self, reader: F) -> T
Executes a read-only operation on the underlying SurfnetSvm by acquiring a blocking read lock.
Accepts a closure that receives a shared reference to SurfnetSvm and returns a value.
§Returns
The result produced by the closure.
Sourcepub fn with_svm_writer<T, F>(&self, writer: F) -> T
pub fn with_svm_writer<T, F>(&self, writer: F) -> T
Executes a write operation on the underlying SurfnetSvm by acquiring a blocking write lock.
Accepts a closure that receives a mutable reference to SurfnetSvm and returns a value.
§Returns
The result produced by the closure.
Source§impl SurfnetSvmLocker
Functions for creating and initializing the underlying SurfnetSvm instance
impl SurfnetSvmLocker
Functions for creating and initializing the underlying SurfnetSvm instance
Sourcepub fn new(svm: SurfnetSvm) -> Self
pub fn new(svm: SurfnetSvm) -> Self
Constructs a new SurfnetSvmLocker wrapping the given SurfnetSvm instance.
Sourcepub async fn initialize(
&self,
remote_ctx: &Option<SurfnetRemoteClient>,
) -> SurfpoolResult<EpochInfo>
pub async fn initialize( &self, remote_ctx: &Option<SurfnetRemoteClient>, ) -> SurfpoolResult<EpochInfo>
Initializes the locked SurfnetSvm by fetching or defaulting epoch info,
then calling its initialize method. Returns the epoch info on success.
Source§impl SurfnetSvmLocker
Functions for getting accounts from the underlying SurfnetSvm instance or remote client
impl SurfnetSvmLocker
Functions for getting accounts from the underlying SurfnetSvm instance or remote client
Sourcepub fn get_account_local(
&self,
pubkey: &Pubkey,
) -> SvmAccessContext<GetAccountResult>
pub fn get_account_local( &self, pubkey: &Pubkey, ) -> SvmAccessContext<GetAccountResult>
Retrieves a local account from the SVM cache, returning a contextualized result.
Sourcepub async fn get_account_local_then_remote(
&self,
client: &SurfnetRemoteClient,
pubkey: &Pubkey,
commitment_config: CommitmentConfig,
) -> SurfpoolContextualizedResult<GetAccountResult>
pub async fn get_account_local_then_remote( &self, client: &SurfnetRemoteClient, pubkey: &Pubkey, commitment_config: CommitmentConfig, ) -> SurfpoolContextualizedResult<GetAccountResult>
Attempts local retrieval, then fetches from remote if missing, returning a contextualized result.
Sourcepub async fn get_account(
&self,
remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>,
pubkey: &Pubkey,
factory: Option<AccountFactory>,
) -> SurfpoolContextualizedResult<GetAccountResult>
pub async fn get_account( &self, remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>, pubkey: &Pubkey, factory: Option<AccountFactory>, ) -> SurfpoolContextualizedResult<GetAccountResult>
Retrieves an account, using local or remote based on context, applying a default factory if provided.
Sourcepub fn get_multiple_accounts_local(
&self,
pubkeys: &[Pubkey],
) -> SvmAccessContext<Vec<GetAccountResult>>
pub fn get_multiple_accounts_local( &self, pubkeys: &[Pubkey], ) -> SvmAccessContext<Vec<GetAccountResult>>
Retrieves multiple accounts from local cache, returning a contextualized result.
Sourcepub async fn get_multiple_accounts_local_then_remote(
&self,
client: &SurfnetRemoteClient,
pubkeys: &[Pubkey],
commitment_config: CommitmentConfig,
) -> SurfpoolContextualizedResult<Vec<GetAccountResult>>
pub async fn get_multiple_accounts_local_then_remote( &self, client: &SurfnetRemoteClient, pubkeys: &[Pubkey], commitment_config: CommitmentConfig, ) -> SurfpoolContextualizedResult<Vec<GetAccountResult>>
Retrieves multiple accounts, fetching missing ones from remote, returning a contextualized result.
Sourcepub async fn get_multiple_accounts(
&self,
remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>,
pubkeys: &[Pubkey],
factory: Option<AccountFactory>,
) -> SurfpoolContextualizedResult<Vec<GetAccountResult>>
pub async fn get_multiple_accounts( &self, remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>, pubkeys: &[Pubkey], factory: Option<AccountFactory>, ) -> SurfpoolContextualizedResult<Vec<GetAccountResult>>
Retrieves multiple accounts, using local or remote context and applying factory defaults if provided.
Sourcepub fn get_largest_accounts_local(
&self,
config: RpcLargestAccountsConfig,
) -> SvmAccessContext<Vec<RpcAccountBalance>>
pub fn get_largest_accounts_local( &self, config: RpcLargestAccountsConfig, ) -> SvmAccessContext<Vec<RpcAccountBalance>>
Retrieves largest accounts from local cache, returning a contextualized result.
pub async fn get_largest_accounts_local_then_remote( &self, client: &SurfnetRemoteClient, config: RpcLargestAccountsConfig, commitment_config: CommitmentConfig, ) -> SurfpoolContextualizedResult<Vec<RpcAccountBalance>>
pub async fn get_largest_accounts( &self, remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>, config: RpcLargestAccountsConfig, ) -> SurfpoolContextualizedResult<Vec<RpcAccountBalance>>
pub fn account_to_rpc_keyed_account<T: ReadableAccount + Send + Sync>( &self, pubkey: &Pubkey, account: &T, config: &RpcAccountInfoConfig, token_mint: Option<Pubkey>, ) -> RpcKeyedAccount
Source§impl SurfnetSvmLocker
Get signatures for Addresses
impl SurfnetSvmLocker
Get signatures for Addresses
pub fn get_signatures_for_address_local( &self, pubkey: &Pubkey, config: Option<RpcSignaturesForAddressConfig>, ) -> SvmAccessContext<Vec<RpcConfirmedTransactionStatusWithSignature>>
pub async fn get_signatures_for_address_local_then_remote( &self, client: &SurfnetRemoteClient, pubkey: &Pubkey, config: Option<RpcSignaturesForAddressConfig>, ) -> SurfpoolContextualizedResult<Vec<RpcConfirmedTransactionStatusWithSignature>>
pub async fn get_signatures_for_address( &self, remote_ctx: &Option<(SurfnetRemoteClient, ())>, pubkey: &Pubkey, config: Option<RpcSignaturesForAddressConfig>, ) -> SurfpoolContextualizedResult<Vec<RpcConfirmedTransactionStatusWithSignature>>
Source§impl SurfnetSvmLocker
Functions for getting transactions from the underlying SurfnetSvm instance or remote client
impl SurfnetSvmLocker
Functions for getting transactions from the underlying SurfnetSvm instance or remote client
Sourcepub async fn get_transaction(
&self,
remote_ctx: &Option<SurfnetRemoteClient>,
signature: &Signature,
config: RpcTransactionConfig,
) -> SurfpoolResult<GetTransactionResult>
pub async fn get_transaction( &self, remote_ctx: &Option<SurfnetRemoteClient>, signature: &Signature, config: RpcTransactionConfig, ) -> SurfpoolResult<GetTransactionResult>
Retrieves a transaction by signature, using local or remote based on context.
Sourcepub fn get_transaction_local(
&self,
signature: &Signature,
config: &RpcTransactionConfig,
) -> SurfpoolResult<GetTransactionResult>
pub fn get_transaction_local( &self, signature: &Signature, config: &RpcTransactionConfig, ) -> SurfpoolResult<GetTransactionResult>
Retrieves a transaction from local cache, returning a contextualized result.
Sourcepub async fn get_transaction_local_then_remote(
&self,
client: &SurfnetRemoteClient,
signature: &Signature,
config: RpcTransactionConfig,
) -> SurfpoolResult<GetTransactionResult>
pub async fn get_transaction_local_then_remote( &self, client: &SurfnetRemoteClient, signature: &Signature, config: RpcTransactionConfig, ) -> SurfpoolResult<GetTransactionResult>
Retrieves a transaction locally then from remote if missing, returning a contextualized result.
Source§impl SurfnetSvmLocker
Functions for simulating and processing transactions in the underlying SurfnetSvm instance
impl SurfnetSvmLocker
Functions for simulating and processing transactions in the underlying SurfnetSvm instance
Sourcepub fn simulate_transaction(
&self,
transaction: VersionedTransaction,
sigverify: bool,
) -> Result<SimulatedTransactionInfo, FailedTransactionMetadata>
pub fn simulate_transaction( &self, transaction: VersionedTransaction, sigverify: bool, ) -> Result<SimulatedTransactionInfo, FailedTransactionMetadata>
Simulates a transaction on the SVM, returning detailed info or failure metadata.
Sourcepub async fn process_transaction(
&self,
remote_ctx: &Option<SurfnetRemoteClient>,
transaction: VersionedTransaction,
status_tx: Sender<TransactionStatusEvent>,
skip_preflight: bool,
) -> SurfpoolContextualizedResult<()>
pub async fn process_transaction( &self, remote_ctx: &Option<SurfnetRemoteClient>, transaction: VersionedTransaction, status_tx: Sender<TransactionStatusEvent>, skip_preflight: bool, ) -> SurfpoolContextualizedResult<()>
Processes a transaction: verifies signatures, preflight sim, sends to SVM, and enqueues status events.
Source§impl SurfnetSvmLocker
Functions for writing account updates to the underlying SurfnetSvm instance
impl SurfnetSvmLocker
Functions for writing account updates to the underlying SurfnetSvm instance
Sourcepub fn write_account_update(&self, account_update: GetAccountResult)
pub fn write_account_update(&self, account_update: GetAccountResult)
Writes a single account update into the SVM state if present.
Sourcepub fn write_multiple_account_updates(
&self,
account_updates: &[GetAccountResult],
)
pub fn write_multiple_account_updates( &self, account_updates: &[GetAccountResult], )
Writes multiple account updates into the SVM state when any are present.
Source§impl SurfnetSvmLocker
Token account related functions
impl SurfnetSvmLocker
Token account related functions
Sourcepub async fn get_token_accounts_by_owner(
&self,
remote_ctx: &Option<SurfnetRemoteClient>,
owner: Pubkey,
filter: &TokenAccountsFilter,
config: &RpcAccountInfoConfig,
) -> SurfpoolContextualizedResult<Vec<RpcKeyedAccount>>
pub async fn get_token_accounts_by_owner( &self, remote_ctx: &Option<SurfnetRemoteClient>, owner: Pubkey, filter: &TokenAccountsFilter, config: &RpcAccountInfoConfig, ) -> SurfpoolContextualizedResult<Vec<RpcKeyedAccount>>
Fetches all token accounts for an owner, returning remote results and missing pubkeys contexts.
pub fn get_token_accounts_by_owner_local( &self, owner: Pubkey, filter: &TokenAccountsFilter, config: &RpcAccountInfoConfig, ) -> SvmAccessContext<Vec<RpcKeyedAccount>>
pub async fn get_token_accounts_by_owner_local_then_remote( &self, owner: Pubkey, filter: &TokenAccountsFilter, remote_client: &SurfnetRemoteClient, config: &RpcAccountInfoConfig, ) -> SurfpoolContextualizedResult<Vec<RpcKeyedAccount>>
pub async fn get_token_accounts_by_delegate( &self, remote_ctx: &Option<SurfnetRemoteClient>, delegate: Pubkey, filter: &TokenAccountsFilter, config: &RpcAccountInfoConfig, ) -> SurfpoolContextualizedResult<Vec<RpcKeyedAccount>>
Source§impl SurfnetSvmLocker
Token account by delegate related functions
impl SurfnetSvmLocker
Token account by delegate related functions
pub fn get_token_accounts_by_delegate_local( &self, delegate: Pubkey, filter: &TokenAccountsFilter, config: &RpcAccountInfoConfig, ) -> SvmAccessContext<Vec<RpcKeyedAccount>>
pub async fn get_token_accounts_by_delegate_local_then_remote( &self, delegate: Pubkey, filter: &TokenAccountsFilter, remote_client: &SurfnetRemoteClient, config: &RpcAccountInfoConfig, ) -> SurfpoolContextualizedResult<Vec<RpcKeyedAccount>>
Source§impl SurfnetSvmLocker
Get largest account related account
impl SurfnetSvmLocker
Get largest account related account
pub fn get_token_largest_accounts_local( &self, mint: &Pubkey, ) -> SvmAccessContext<Vec<RpcTokenAccountBalance>>
pub async fn get_token_largest_accounts_local_then_remote( &self, client: &SurfnetRemoteClient, mint: &Pubkey, commitment_config: CommitmentConfig, ) -> SurfpoolContextualizedResult<Vec<RpcTokenAccountBalance>>
Sourcepub async fn get_token_largest_accounts(
&self,
remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>,
mint: &Pubkey,
) -> SurfpoolContextualizedResult<Vec<RpcTokenAccountBalance>>
pub async fn get_token_largest_accounts( &self, remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>, mint: &Pubkey, ) -> SurfpoolContextualizedResult<Vec<RpcTokenAccountBalance>>
Fetches the largest token accounts for a specific mint, returning contextualized results.
Source§impl SurfnetSvmLocker
Address lookup table related functions
impl SurfnetSvmLocker
Address lookup table related functions
Sourcepub fn get_pubkeys_from_message(
&self,
message: &VersionedMessage,
loaded_addresses: Option<LoadedAddresses>,
) -> Vec<Pubkey>
pub fn get_pubkeys_from_message( &self, message: &VersionedMessage, loaded_addresses: Option<LoadedAddresses>, ) -> Vec<Pubkey>
Extracts pubkeys from a VersionedMessage, resolving address lookup tables as needed.
Sourcepub async fn get_loaded_addresses(
&self,
remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>,
message: &VersionedMessage,
) -> SurfpoolResult<Option<LoadedAddresses>>
pub async fn get_loaded_addresses( &self, remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>, message: &VersionedMessage, ) -> SurfpoolResult<Option<LoadedAddresses>>
Gets addresses loaded from on-chain lookup tables from a VersionedMessage.
Sourcepub async fn get_lookup_table_addresses(
&self,
remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>,
address_table_lookup: &MessageAddressTableLookup,
) -> SurfpoolContextualizedResult<LoadedAddresses>
pub async fn get_lookup_table_addresses( &self, remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>, address_table_lookup: &MessageAddressTableLookup, ) -> SurfpoolContextualizedResult<LoadedAddresses>
Retrieves loaded addresses from a lookup table account, validating owner and indices.
Source§impl SurfnetSvmLocker
Profiling helper functions
impl SurfnetSvmLocker
Profiling helper functions
Sourcepub fn estimate_compute_units(
&self,
transaction: &VersionedTransaction,
) -> SvmAccessContext<ComputeUnitsEstimationResult>
pub fn estimate_compute_units( &self, transaction: &VersionedTransaction, ) -> SvmAccessContext<ComputeUnitsEstimationResult>
Estimates compute units for a transaction via contextualized simulation.
pub async fn profile_transaction( &self, remote_ctx: &Option<SurfnetRemoteClient>, transaction: VersionedTransaction, encoding: Option<UiAccountEncoding>, tag: Option<String>, ) -> SurfpoolContextualizedResult<ProfileResult>
Sourcepub fn get_profile_result(
&self,
signature_or_uuid: UuidOrSignature,
) -> SurfpoolResult<Option<ProfileResult>>
pub fn get_profile_result( &self, signature_or_uuid: UuidOrSignature, ) -> SurfpoolResult<Option<ProfileResult>>
Returns the profile result for a given signature or UUID, and whether it exists in the SVM.
Sourcepub fn get_profile_results_by_tag(
&self,
tag: String,
) -> SurfpoolResult<Option<Vec<ProfileResult>>>
pub fn get_profile_results_by_tag( &self, tag: String, ) -> SurfpoolResult<Option<Vec<ProfileResult>>>
Returns the profile results for a given tag.
Source§impl SurfnetSvmLocker
Program account related functions
impl SurfnetSvmLocker
Program account related functions
Sourcepub async fn clone_program_account(
&self,
remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>,
source_program_id: &Pubkey,
destination_program_id: &Pubkey,
) -> SurfpoolContextualizedResult<()>
pub async fn clone_program_account( &self, remote_ctx: &Option<(SurfnetRemoteClient, CommitmentConfig)>, source_program_id: &Pubkey, destination_program_id: &Pubkey, ) -> SurfpoolContextualizedResult<()>
Clones a program account from source to destination, handling upgradeable loader state.
pub async fn get_program_accounts( &self, remote_ctx: &Option<SurfnetRemoteClient>, program_id: &Pubkey, account_config: RpcAccountInfoConfig, filters: Option<Vec<RpcFilterType>>, ) -> SurfpoolContextualizedResult<Vec<RpcKeyedAccount>>
Sourcepub fn get_program_accounts_local(
&self,
program_id: &Pubkey,
account_config: RpcAccountInfoConfig,
filters: Option<Vec<RpcFilterType>>,
) -> SurfpoolContextualizedResult<Vec<RpcKeyedAccount>>
pub fn get_program_accounts_local( &self, program_id: &Pubkey, account_config: RpcAccountInfoConfig, filters: Option<Vec<RpcFilterType>>, ) -> SurfpoolContextualizedResult<Vec<RpcKeyedAccount>>
Retrieves program accounts from the local SVM cache, returning a contextualized result.
Sourcepub async fn get_program_accounts_local_then_remote(
&self,
client: &SurfnetRemoteClient,
program_id: &Pubkey,
account_config: RpcAccountInfoConfig,
filters: Option<Vec<RpcFilterType>>,
) -> SurfpoolContextualizedResult<Vec<RpcKeyedAccount>>
pub async fn get_program_accounts_local_then_remote( &self, client: &SurfnetRemoteClient, program_id: &Pubkey, account_config: RpcAccountInfoConfig, filters: Option<Vec<RpcFilterType>>, ) -> SurfpoolContextualizedResult<Vec<RpcKeyedAccount>>
Retrieves program accounts from the local cache and remote client, combining results.
Source§impl SurfnetSvmLocker
impl SurfnetSvmLocker
pub fn get_first_local_slot(&self) -> Option<Slot>
pub async fn get_block( &self, remote_ctx: &Option<SurfnetRemoteClient>, slot: &Slot, config: &RpcBlockConfig, ) -> SurfpoolContextualizedResult<Option<UiConfirmedBlock>>
pub fn get_block_local( &self, slot: &Slot, config: &RpcBlockConfig, ) -> SurfpoolResult<Option<UiConfirmedBlock>>
pub fn get_genesis_hash_local(&self) -> SvmAccessContext<Hash>
pub async fn get_genesis_hash( &self, remote_ctx: &Option<SurfnetRemoteClient>, ) -> SurfpoolContextualizedResult<Hash>
Source§impl SurfnetSvmLocker
Pass through functions for accessing the underlying SurfnetSvm instance
impl SurfnetSvmLocker
Pass through functions for accessing the underlying SurfnetSvm instance
Sourcepub fn simnet_events_tx(&self) -> Sender<SimnetEvent>
pub fn simnet_events_tx(&self) -> Sender<SimnetEvent>
Returns a sender for simulation events from the underlying SVM.
Sourcepub fn get_epoch_info(&self) -> EpochInfo
pub fn get_epoch_info(&self) -> EpochInfo
Retrieves the latest epoch info from the underlying SVM.
Sourcepub fn get_latest_absolute_slot(&self) -> Slot
pub fn get_latest_absolute_slot(&self) -> Slot
Retrieves the latest absolute slot from the underlying SVM.
Sourcepub fn get_latest_blockhash(&self, config: &CommitmentConfig) -> Option<Hash>
pub fn get_latest_blockhash(&self, config: &CommitmentConfig) -> Option<Hash>
Retrieves the latest blockhash for the given commitment config from the underlying SVM.
pub fn get_slot_for_commitment(&self, commitment: &CommitmentConfig) -> Slot
Sourcepub fn airdrop(&self, pubkey: &Pubkey, lamports: u64) -> TransactionResult
pub fn airdrop(&self, pubkey: &Pubkey, lamports: u64) -> TransactionResult
Executes an airdrop via the underlying SVM.
Sourcepub fn airdrop_pubkeys(&self, lamports: u64, addresses: &[Pubkey])
pub fn airdrop_pubkeys(&self, lamports: u64, addresses: &[Pubkey])
Executes a batch airdrop via the underlying SVM.
Sourcepub fn confirm_current_block(&self) -> SurfpoolResult<()>
pub fn confirm_current_block(&self) -> SurfpoolResult<()>
Confirms the current block on the underlying SVM, returning Ok(()) or an error.
Sourcepub fn subscribe_for_signature_updates(
&self,
signature: &Signature,
subscription_type: SignatureSubscriptionType,
) -> Receiver<(Slot, Option<TransactionError>)>
pub fn subscribe_for_signature_updates( &self, signature: &Signature, subscription_type: SignatureSubscriptionType, ) -> Receiver<(Slot, Option<TransactionError>)>
Subscribes for signature updates (confirmed/finalized) and returns a receiver of events.
Sourcepub fn subscribe_for_account_updates(
&self,
account_pubkey: &Pubkey,
encoding: Option<UiAccountEncoding>,
) -> Receiver<UiAccount>
pub fn subscribe_for_account_updates( &self, account_pubkey: &Pubkey, encoding: Option<UiAccountEncoding>, ) -> Receiver<UiAccount>
Subscribes for account updates and returns a receiver of account updates.
Sourcepub fn subscribe_for_slot_updates(&self) -> Receiver<SlotInfo>
pub fn subscribe_for_slot_updates(&self) -> Receiver<SlotInfo>
Subscribes for slot updates and returns a receiver of slot updates.
Sourcepub fn subscribe_for_logs_updates(
&self,
commitment_level: &CommitmentLevel,
filter: &RpcTransactionLogsFilter,
) -> Receiver<(Slot, RpcLogsResponse)>
pub fn subscribe_for_logs_updates( &self, commitment_level: &CommitmentLevel, filter: &RpcTransactionLogsFilter, ) -> Receiver<(Slot, RpcLogsResponse)>
Subscribes for logs updates and returns a receiver of logs updates.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SurfnetSvmLocker
impl !RefUnwindSafe for SurfnetSvmLocker
impl Send for SurfnetSvmLocker
impl Sync for SurfnetSvmLocker
impl Unpin for SurfnetSvmLocker
impl !UnwindSafe for SurfnetSvmLocker
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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