Struct Switchboard

Source
pub struct Switchboard<M>(/* private fields */);

Implementations§

Source§

impl<M: Middleware> Switchboard<M>

Source

pub fn new<T: Into<Address>>(address: T, client: Arc<M>) -> Self

Creates a new contract instance with the specified ethers client at address. The contract derefs to a ethers::Contract object.

Source

pub fn add_mr_enclave_to_attestation_queue( &self, queue_id: Address, mr_enclave: [u8; 32], ) -> ContractCall<M, ()>

Calls the contract’s addMrEnclaveToAttestationQueue (0xad435b9d) function

Source

pub fn add_mr_enclave_to_function( &self, function_id: Address, mr_enclave: [u8; 32], ) -> ContractCall<M, ()>

Calls the contract’s addMrEnclaveToFunction (0x45fc160c) function

Source

pub fn add_mr_enclave_to_oracle_queue( &self, queue_id: Address, mr_enclave: [u8; 32], ) -> ContractCall<M, ()>

Calls the contract’s addMrEnclaveToOracleQueue (0x51a426d8) function

Source

pub fn add_stake( &self, enclave_id: Address, amount: U256, ) -> ContractCall<M, ()>

Calls the contract’s addStake (0x6374299e) function

Source

pub fn aggregator_escrow_fund(&self, account_id: Address) -> ContractCall<M, ()>

Calls the contract’s aggregatorEscrowFund (0xd55dcc5b) function

Source

pub fn aggregator_escrow_withdraw( &self, recipient: Address, aggregator_id: Address, amount: U256, ) -> ContractCall<M, ()>

Calls the contract’s aggregatorEscrowWithdraw (0x202dd499) function

Source

pub fn aggregator_history( &self, aggregator_id: Address, round_id: u128, ) -> ContractCall<M, AggregatorHistoryResult>

Calls the contract’s aggregatorHistory (0x8625bd08) function

Source

pub fn aggregators(&self, aggregator_id: Address) -> ContractCall<M, Aggregator>

Calls the contract’s aggregators (0x112cdab9) function

Source

pub fn allowance( &self, owner: Address, spender: Address, ) -> ContractCall<M, U256>

Calls the contract’s allowance (0xdd62ed3e) function

Source

pub fn approve(&self, spender: Address, value: U256) -> ContractCall<M, bool>

Calls the contract’s approve (0x095ea7b3) function

Source

pub fn attestation_queue_has_mr_enclave( &self, queue_id: Address, mr_enclave: [u8; 32], ) -> ContractCall<M, bool>

Calls the contract’s attestationQueueHasMrEnclave (0x63fcd771) function

Source

pub fn attestation_queues( &self, queue_id: Address, ) -> ContractCall<M, AttestationQueue>

Calls the contract’s attestationQueues (0x8bb3048c) function

Source

pub fn balance_of(&self, account: Address) -> ContractCall<M, U256>

Calls the contract’s balanceOf (0x70a08231) function

Source

pub fn call_balances( &self, call_ids: Vec<Address>, ) -> ContractCall<M, Vec<U256>>

Calls the contract’s callBalances (0x0aaeffe5) function

Source

pub fn call_function( &self, function_id: Address, params: Bytes, ) -> ContractCall<M, Address>

Calls the contract’s callFunction (0x9c23da50) function

Source

pub fn create_aggregator( &self, name: String, authority: Address, batch_size: U256, min_update_delay_seconds: U256, min_oracle_results: U256, jobs_hash: String, queue_id: Address, variance_threshold: U256, min_job_results: U256, force_report_period: U256, enable_history: bool, ) -> ContractCall<M, ()>

Calls the contract’s createAggregator (0x84ed8177) function

Source

pub fn create_attestation_queue( &self, authority: Address, max_size: U256, reward: U256, enclave_timeout: U256, max_enclave_verification_age: U256, allow_authority_override_after: U256, require_authority_heartbeat_permission: bool, require_usage_permissions: bool, max_consecutive_function_failures: U256, ) -> ContractCall<M, ()>

Calls the contract’s createAttestationQueue (0xde776851) function

Source

pub fn create_enclave( &self, signer: Address, queue_id: Address, authority: Address, ) -> ContractCall<M, ()>

Calls the contract’s createEnclave (0xcf392e2f) function

Source

pub fn create_enclave_with_id( &self, enclave_id: Address, signer: Address, queue_id: Address, authority: Address, ) -> ContractCall<M, ()>

Calls the contract’s createEnclaveWithId (0xc7c1143e) function

Source

pub fn create_function( &self, name: String, authority: Address, queue_id: Address, container_registry: String, container: String, version: String, schedule: String, params_schema: String, permitted_callers: Vec<Address>, ) -> ContractCall<M, ()>

Calls the contract’s createFunction (0xc4829580) function

Source

pub fn create_function_with_id( &self, function_id: Address, name: String, authority: Address, queue_id: Address, container_registry: String, container: String, version: String, schedule: String, params_schema: String, permitted_callers: Vec<Address>, ) -> ContractCall<M, ()>

Calls the contract’s createFunctionWithId (0xcd86c71b) function

Source

pub fn create_oracle( &self, name: String, signer: Address, queue_id: Address, authority: Address, ) -> ContractCall<M, ()>

Calls the contract’s createOracle (0xf843b846) function

Source

pub fn create_oracle_queue( &self, name: String, authority: Address, unpermissioned_feeds_enabled: bool, max_size: U256, reward: U256, oracle_timeout: U256, ) -> ContractCall<M, ()>

Calls the contract’s createOracleQueue (0xe7675651) function

Source

pub fn create_oracle_with_id( &self, oracle_id: Address, name: String, signer: Address, queue_id: Address, authority: Address, ) -> ContractCall<M, ()>

Calls the contract’s createOracleWithId (0x16703130) function

Source

pub fn create_routine_with_id( &self, routine_id: Address, function_id: Address, authority: Address, params: Bytes, schedule: String, ) -> ContractCall<M, ()>

Calls the contract’s createRoutineWithId (0x410d3013) function

Source

pub fn diamond_cut( &self, diamond_cut: Vec<FacetCut>, init: Address, calldata: Bytes, ) -> ContractCall<M, ()>

Calls the contract’s diamondCut (0x1f931c1c) function

Source

pub fn enclave_garbage_collect( &self, enclave_id: Address, enclave_idx: U256, ) -> ContractCall<M, ()>

Calls the contract’s enclaveGarbageCollect (0xc06e4eda) function

Source

pub fn enclave_heartbeat(&self, enclave_id: Address) -> ContractCall<M, ()>

Calls the contract’s enclaveHeartbeat (0xce834437) function

Source

pub fn enclave_signer_to_enclave_id( &self, signer: Address, ) -> ContractCall<M, Address>

Calls the contract’s enclaveSignerToEnclaveId (0x2ff75ec2) function

Source

pub fn enclaves(&self, enclave_id: Address) -> ContractCall<M, Enclave>

Calls the contract’s enclaves (0xfaeedb07) function

Source

pub fn estimated_run_cost( &self, function_id: Address, gas_price: U256, ) -> ContractCall<M, U256>

Calls the contract’s estimatedRunCost (0x3da87438) function

Source

pub fn facet_address( &self, function_selector: [u8; 4], ) -> ContractCall<M, Address>

Calls the contract’s facetAddress (0xcdffacc6) function

Source

pub fn facet_addresses(&self) -> ContractCall<M, Vec<Address>>

Calls the contract’s facetAddresses (0x52ef6b2c) function

Source

pub fn facet_function_selectors( &self, facet: Address, ) -> ContractCall<M, Vec<[u8; 4]>>

Calls the contract’s facetFunctionSelectors (0xadfca15e) function

Source

pub fn facets(&self) -> ContractCall<M, Vec<Facet>>

Calls the contract’s facets (0x7a0ed627) function

Source

pub fn fail_enclave( &self, verifier_id: Address, enclave_id: Address, verifier_idx: U256, ) -> ContractCall<M, ()>

Calls the contract’s failEnclave (0x39d920e6) function

Source

pub fn fail_function_result( &self, params: FunctionFailParams, ) -> ContractCall<M, ()>

Calls the contract’s failFunctionResult (0x52c7cc93) function

Source

pub fn force_override_verify(&self, enclave_id: Address) -> ContractCall<M, ()>

Calls the contract’s forceOverrideVerify (0xe231b12f) function

Source

pub fn forward( &self, transactions: Vec<Transaction>, signatures: Vec<Bytes>, ) -> ContractCall<M, ()>

Calls the contract’s forward (0x7096052c) function

Source

pub fn funcs(&self, function_id: Address) -> ContractCall<M, SbFunction>

Calls the contract’s funcs (0x8ef92003) function

Source

pub fn function_call_settings( &self, function_id: Address, ) -> ContractCall<M, FunctionCallSettings>

Calls the contract’s functionCallSettings (0xa30f8d25) function

Source

pub fn function_calls(&self, call_id: Address) -> ContractCall<M, FunctionCall>

Calls the contract’s functionCalls (0x826df326) function

Source

pub fn function_escrow_fund(&self, account_id: Address) -> ContractCall<M, ()>

Calls the contract’s functionEscrowFund (0xba93166c) function

Source

pub fn function_escrow_withdraw( &self, recipient: Address, function_id: Address, amount: U256, ) -> ContractCall<M, ()>

Calls the contract’s functionEscrowWithdraw (0xa29baf1e) function

Source

pub fn function_exists(&self, function_id: Address) -> ContractCall<M, bool>

Calls the contract’s functionExists (0xa13001c9) function

Source

pub fn function_settings( &self, function_id: Address, ) -> ContractCall<M, FunctionSettings>

Calls the contract’s functionSettings (0xce77efa6) function

Source

pub fn function_verify( &self, enclave_idx: U256, function_id: Address, delegated_signer_address: Address, observed_time: U256, next_allowed_timestamp: U256, is_failure: bool, mr_enclave: [u8; 32], transactions: Vec<Transaction>, signatures: Vec<Bytes>, ) -> ContractCall<M, ()>

Calls the contract’s functionVerify (0xa5625b96) function

Source

pub fn function_verify_request( &self, enclave_idx: U256, function_id: Address, delegated_signer_address: Address, observed_time: U256, next_allowed_timestamp: U256, is_failure: bool, mr_enclave: [u8; 32], transactions: Vec<Transaction>, signatures: Vec<Bytes>, function_call_ids: Vec<Address>, ) -> ContractCall<M, ()>

Calls the contract’s functionVerifyRequest (0xb8390a56) function

Source

pub fn get_active_function_calls_by_queue( &self, queue_id: Address, ) -> ContractCall<M, (Vec<Address>, Vec<FunctionCall>)>

Calls the contract’s getActiveFunctionCallsByQueue (0xfa88c651) function

Source

pub fn get_active_functions_by_queue( &self, queue_id: Address, ) -> ContractCall<M, (Vec<Address>, Vec<SbFunction>)>

Calls the contract’s getActiveFunctionsByQueue (0x1fc747b7) function

Source

pub fn get_active_requests_by_queue( &self, queue_id: Address, ) -> ContractCall<M, (Vec<Address>, Vec<Request>)>

Calls the contract’s getActiveRequestsByQueue (0x55c053c3) function

Source

pub fn get_active_routines_by_queue( &self, queue_id: Address, ) -> ContractCall<M, (Vec<Address>, Vec<Routine>)>

Calls the contract’s getActiveRoutinesByQueue (0x9da3c6eb) function

Source

pub fn get_aggregators_by_authority( &self, user: Address, ) -> ContractCall<M, (Vec<Address>, Vec<Aggregator>)>

Calls the contract’s getAggregatorsByAuthority (0x911c30f3) function

Source

pub fn get_all_aggregators( &self, ) -> ContractCall<M, (Vec<Address>, Vec<Aggregator>)>

Calls the contract’s getAllAggregators (0x465c65dd) function

Source

pub fn get_all_functions( &self, ) -> ContractCall<M, (Vec<Address>, Vec<SbFunction>)>

Calls the contract’s getAllFunctions (0xab6418b4) function

Source

pub fn get_attestation_queue_mr_enclaves( &self, queue_id: Address, ) -> ContractCall<M, Vec<[u8; 32]>>

Calls the contract’s getAttestationQueueMrEnclaves (0x0f3bc418) function

Source

pub fn get_current_interval_id( &self, aggregator_id: Address, ) -> ContractCall<M, u128>

Calls the contract’s getCurrentIntervalId (0x1dc1da86) function

Source

pub fn get_enclave_idx(&self, enclave_id: Address) -> ContractCall<M, I256>

Calls the contract’s getEnclaveIdx (0x21fb3bbc) function

Source

pub fn get_enclaves(&self, queue_id: Address) -> ContractCall<M, Vec<Address>>

Calls the contract’s getEnclaves (0x340dd88b) function

Source

pub fn get_function_mr_enclaves( &self, function_id: Address, ) -> ContractCall<M, Vec<[u8; 32]>>

Calls the contract’s getFunctionMrEnclaves (0x526112ce) function

Source

pub fn get_function_permitted_callers( &self, function_id: Address, ) -> ContractCall<M, Vec<Address>>

Calls the contract’s getFunctionPermittedCallers (0xafdcbd6a) function

Source

pub fn get_functions_by_authority( &self, user: Address, ) -> ContractCall<M, (Vec<Address>, Vec<SbFunction>)>

Calls the contract’s getFunctionsByAuthority (0x357f633f) function

Source

pub fn get_interval_result( &self, aggregator_id: Address, interval_id: u128, ) -> ContractCall<M, (I256, U256, U256)>

Calls the contract’s getIntervalResult (0x3d24ef6e) function

Source

pub fn get_oracle_idx(&self, oracle_id: Address) -> ContractCall<M, I256>

Calls the contract’s getOracleIdx (0xd87dd0ac) function

Source

pub fn get_oracle_queue_allowed_mr_enclaves( &self, queue_id: Address, ) -> ContractCall<M, Vec<[u8; 32]>>

Calls the contract’s getOracleQueueAllowedMrEnclaves (0xf04b0f59) function

Source

pub fn get_oracles(&self, queue_id: Address) -> ContractCall<M, Vec<Address>>

Calls the contract’s getOracles (0x8e749281) function

Source

pub fn get_permission( &self, granter: Address, grantee: Address, ) -> ContractCall<M, U256>

Calls the contract’s getPermission (0x910185dd) function

Source

pub fn get_requests_by_function_id( &self, function_id: Address, ) -> ContractCall<M, (Vec<Address>, Vec<Request>)>

Calls the contract’s getRequestsByFunctionId (0xb68e3ace) function

Source

pub fn get_routines_by_authority( &self, authority: Address, ) -> ContractCall<M, (Vec<Address>, Vec<Routine>)>

Calls the contract’s getRoutinesByAuthority (0xb36afb5a) function

Source

pub fn get_routines_by_function_id( &self, function_id: Address, ) -> ContractCall<M, (Vec<Address>, Vec<Routine>)>

Calls the contract’s getRoutinesByFunctionId (0x27c66c0f) function

Source

pub fn get_stake_for_enclave( &self, enclave_id: Address, ) -> ContractCall<M, Stake>

Calls the contract’s getStakeForEnclave (0x376d9b41) function

Source

pub fn get_stake_for_enclave_with_token( &self, enclave_id: Address, token: Address, ) -> ContractCall<M, Stake>

Calls the contract’s getStakeForEnclaveWithToken (0x3ff8f2af) function

Source

pub fn get_staking_config( &self, queue_id: Address, ) -> ContractCall<M, StakingConfig>

Calls the contract’s getStakingConfig (0x5133a68c) function

Source

pub fn get_transaction_hash( &self, expiration_time_seconds: U256, gas_limit: U256, value: U256, to: Address, from: Address, data: Bytes, ) -> ContractCall<M, [u8; 32]>

Calls the contract’s getTransactionHash (0xd93f1970) function

Source

pub fn has_permission( &self, granter: Address, grantee: Address, permission: U256, ) -> ContractCall<M, bool>

Calls the contract’s hasPermission (0x8b01813d) function

Source

pub fn init(&self) -> ContractCall<M, ()>

Calls the contract’s init (0xe1c7392a) function

Source

pub fn initialize(&self) -> ContractCall<M, ()>

Calls the contract’s initialize (0x8129fc1c) function

Source

pub fn is_admin(&self, sender: Address) -> ContractCall<M, bool>

Calls the contract’s isAdmin (0x24d7806c) function

Source

pub fn is_allowed(&self, sender: Address) -> ContractCall<M, bool>

Calls the contract’s isAllowed (0xbabcc539) function

Source

pub fn is_enclave_valid(&self, enclave_id: Address) -> ContractCall<M, bool>

Calls the contract’s isEnclaveValid (0xfb4acdfe) function

Source

pub fn is_trusted_forwarder(&self, p0: Address) -> ContractCall<M, bool>

Calls the contract’s isTrustedForwarder (0x572b6c05) function

Source

pub fn latest_result( &self, aggregator_id: Address, ) -> ContractCall<M, (I256, U256)>

Calls the contract’s latestResult (0xfab005a2) function

Source

pub fn open_interval(&self, aggregator_id: Address) -> ContractCall<M, ()>

Calls the contract’s openInterval (0x0f2544be) function

Source

pub fn oracle_garbage_collect( &self, oracle_id: Address, oracle_idx: U256, ) -> ContractCall<M, ()>

Calls the contract’s oracleGarbageCollect (0x71da68ff) function

Source

pub fn oracle_heartbeat(&self, oracle_id: Address) -> ContractCall<M, ()>

Calls the contract’s oracleHeartbeat (0xf53b638c) function

Source

pub fn oracle_queues(&self, queue_id: Address) -> ContractCall<M, OracleQueue>

Calls the contract’s oracleQueues (0xf2378e88) function

Source

pub fn oracles(&self, oracle_id: Address) -> ContractCall<M, Oracle>

Calls the contract’s oracles (0xaddd5099) function

Source

pub fn owner(&self) -> ContractCall<M, Address>

Calls the contract’s owner (0x8da5cb5b) function

Source

pub fn prepare_unstake(&self, enclave_id: Address) -> ContractCall<M, ()>

Calls the contract’s prepareUnstake (0xb8d35d6a) function

Source

pub fn queue_attestation_configs( &self, queue_id: Address, ) -> ContractCall<M, AttestationConfig>

Calls the contract’s queueAttestationConfigs (0x6ddc9122) function

Source

pub fn recover_stake_with_token( &self, enclave_id: Address, token: Address, amount: U256, ) -> ContractCall<M, ()>

Calls the contract’s recoverStakeWithToken (0x5e8e1ad0) function

Source

pub fn remove_mr_enclave_from_attestation_queue( &self, queue_id: Address, mr_enclave: [u8; 32], ) -> ContractCall<M, ()>

Calls the contract’s removeMrEnclaveFromAttestationQueue (0x083f30cf) function

Source

pub fn remove_mr_enclave_from_function( &self, function_id: Address, mr_enclave: [u8; 32], ) -> ContractCall<M, ()>

Calls the contract’s removeMrEnclaveFromFunction (0xf0184db9) function

Source

pub fn remove_mr_enclave_from_oracle_queue( &self, queue_id: Address, mr_enclave: [u8; 32], ) -> ContractCall<M, ()>

Calls the contract’s removeMrEnclaveFromOracleQueue (0x262955d8) function

Source

pub fn request_fund(&self, request_id: Address) -> ContractCall<M, ()>

Calls the contract’s requestFund (0x52a061d7) function

Source

pub fn request_withdrawal( &self, request_id: Address, recipient: Address, amount: U256, ) -> ContractCall<M, ()>

Calls the contract’s requestWithdrawal (0x8985646a) function

Source

pub fn requests(&self, request_id: Address) -> ContractCall<M, Request>

Calls the contract’s requests (0x74adad1d) function

Source

pub fn rotate_enclave_signer( &self, enclave_id: Address, new_signer: Address, ) -> ContractCall<M, ()>

Calls the contract’s rotateEnclaveSigner (0x2628b3a9) function

Source

pub fn rotate_oracle_signer( &self, oracle_id: Address, new_signer: Address, ) -> ContractCall<M, ()>

Calls the contract’s rotateOracleSigner (0x4d1b776d) function

Source

pub fn routine_escrow_fund(&self, routine_id: Address) -> ContractCall<M, ()>

Calls the contract’s routineEscrowFund (0x5d4e4594) function

Source

pub fn routine_escrow_withdraw( &self, routine_id: Address, amount: U256, ) -> ContractCall<M, ()>

Calls the contract’s routineEscrowWithdraw (0xfab08683) function

Source

pub fn routine_exists(&self, routine_id: Address) -> ContractCall<M, bool>

Calls the contract’s routineExists (0xc98d9be8) function

Source

pub fn routines(&self, routine_id: Address) -> ContractCall<M, Routine>

Calls the contract’s routines (0xfdcc54d2) function

Source

pub fn save_results( &self, ids: Vec<Address>, results: Vec<I256>, queue_id: Address, oracle_idx: U256, ) -> ContractCall<M, ()>

Calls the contract’s saveResults (0x735e3555) function

Source

pub fn send_delayed_request( &self, request_id: Address, function_id: Address, params: Bytes, start_after: U256, ) -> ContractCall<M, ()>

Calls the contract’s sendDelayedRequest (0x80eb181e) function

Source

pub fn send_request( &self, function_id: Address, params: Bytes, ) -> ContractCall<M, Address>

Calls the contract’s sendRequest (0x62d3fe46) function

Source

pub fn send_request_with_id( &self, request_id: Address, function_id: Address, params: Bytes, ) -> ContractCall<M, Address>

Calls the contract’s sendRequestWithId (0x264c1450) function

Source

pub fn set_admin(&self, sender: Address, status: bool) -> ContractCall<M, ()>

Calls the contract’s setAdmin (0x4b0bddd2) function

Source

pub fn set_aggregator_config( &self, aggregator_id: Address, name: String, authority: Address, batch_size: U256, min_update_delay_seconds: U256, min_oracle_results: U256, jobs_hash: String, queue_id: Address, variance_threshold: U256, min_job_results: U256, force_report_period: U256, enable_history: bool, ) -> ContractCall<M, ()>

Calls the contract’s setAggregatorConfig (0xdd0ad73a) function

Source

pub fn set_allowed(&self, sender: Address, status: bool) -> ContractCall<M, ()>

Calls the contract’s setAllowed (0x4697f05d) function

Source

pub fn set_attestation_queue_config( &self, queue_id: Address, authority: Address, max_size: U256, reward: U256, enclave_timeout: U256, max_enclave_verification_age: U256, allow_authority_override_after: U256, require_authority_heartbeat_permission: bool, require_usage_permissions: bool, max_consecutive_function_failures: U256, ) -> ContractCall<M, ()>

Calls the contract’s setAttestationQueueConfig (0xf7d48307) function

Source

pub fn set_attestation_queue_permission( &self, queue_id: Address, grantee: Address, permission: U256, on: bool, ) -> ContractCall<M, ()>

Calls the contract’s setAttestationQueuePermission (0xa77a07d3) function

Source

pub fn set_function_call_settings( &self, function_id: Address, require_estimated_run_cost_fee: bool, minimum_fee: U256, max_gas_cost: U256, require_caller_pay_full_cost: bool, require_sender_be_return_address: bool, ) -> ContractCall<M, ()>

Calls the contract’s setFunctionCallSettings (0x6b7ef38b) function

Source

pub fn set_function_config( &self, function_id: Address, name: String, authority: Address, container_registry: String, container: String, version: String, schedule: String, params_schema: String, permitted_callers: Vec<Address>, ) -> ContractCall<M, ()>

Calls the contract’s setFunctionConfig (0x822e99d5) function

Source

pub fn set_function_deactivated( &self, function_id: Address, ) -> ContractCall<M, ()>

Calls the contract’s setFunctionDeactivated (0x725483a5) function

Source

pub fn set_function_settings( &self, function_id: Address, settings: FunctionSettings, ) -> ContractCall<M, ()>

Calls the contract’s setFunctionSettings (0xfeb0de89) function

Source

pub fn set_oracle_config( &self, oracle_id: Address, name: String, signer: Address, queue_id: Address, authority: Address, ) -> ContractCall<M, ()>

Calls the contract’s setOracleConfig (0xf50b5ed0) function

Source

pub fn set_oracle_queue_attestation_config( &self, queue_id: Address, attestation_queue_id: Address, mr_enclaves: Vec<[u8; 32]>, require_valid_enclave: bool, require_heartbeat_permission: bool, ) -> ContractCall<M, ()>

Calls the contract’s setOracleQueueAttestationConfig (0x88033af5) function

Source

pub fn set_oracle_queue_config( &self, queue_id: Address, name: String, authority: Address, unpermissioned_feeds_enabled: bool, max_size: U256, reward: U256, oracle_timeout: U256, ) -> ContractCall<M, ()>

Calls the contract’s setOracleQueueConfig (0xb6590411) function

Source

pub fn set_oracle_queue_permission( &self, queue_id: Address, grantee: Address, permission: U256, on: bool, ) -> ContractCall<M, ()>

Calls the contract’s setOracleQueuePermission (0x01fc1ba2) function

Source

pub fn set_staking_config( &self, queue_id: Address, token: Address, staking_amount: U256, staking_period: U256, unstaking_period: U256, ) -> ContractCall<M, ()>

Calls the contract’s setStakingConfig (0xf22644c2) function

Source

pub fn set_tolerated_timestamp_discrepancy( &self, tolerance: U256, ) -> ContractCall<M, ()>

Calls the contract’s setToleratedTimestampDiscrepancy (0x101277b2) function

Source

pub fn slash_stake( &self, enclave_id: Address, amount: U256, ) -> ContractCall<M, ()>

Calls the contract’s slashStake (0x98d1c5a8) function

Source

pub fn supports_interface(&self, interface_id: [u8; 4]) -> ContractCall<M, bool>

Calls the contract’s supportsInterface (0x01ffc9a7) function

Source

pub fn total_staked( &self, queue_id: Address, token: Address, ) -> ContractCall<M, U256>

Calls the contract’s totalStaked (0xf21630cb) function

Source

pub fn total_supply(&self) -> ContractCall<M, U256>

Calls the contract’s totalSupply (0x18160ddd) function

Source

pub fn transfer(&self, to: Address, value: U256) -> ContractCall<M, bool>

Calls the contract’s transfer (0xa9059cbb) function

Source

pub fn transfer_from( &self, from: Address, to: Address, value: U256, ) -> ContractCall<M, bool>

Calls the contract’s transferFrom (0x23b872dd) function

Source

pub fn transfer_ownership(&self, new_owner: Address) -> ContractCall<M, ()>

Calls the contract’s transferOwnership (0xf2fde38b) function

Source

pub fn unstake(&self, enclave_id: Address, amount: U256) -> ContractCall<M, ()>

Calls the contract’s unstake (0xc2a672e0) function

Source

pub fn update_enclave( &self, enclave_id: Address, cid: Bytes, ) -> ContractCall<M, ()>

Calls the contract’s updateEnclave (0x5cd6ac0c) function

Source

pub fn update_routine( &self, routine_id: Address, function_id: Address, authority: Address, params: Bytes, schedule: String, ) -> ContractCall<M, ()>

Calls the contract’s updateRoutine (0x9300c999) function

Source

pub fn validate( &self, signer: Address, attestation_queue_id: Address, valid_measurements: Vec<[u8; 32]>, ) -> ContractCall<M, ()>

Calls the contract’s validate (0x1755a7f8) function

Source

pub fn verify_callback_params( &self, call_ids: Vec<Address>, hashes: Vec<[u8; 32]>, ) -> ContractCall<M, ()>

Calls the contract’s verifyCallbackParams (0x9c5eb6d9) function

Source

pub fn verify_enclave( &self, verifier_id: Address, enclave_id: Address, enclave_idx: U256, timestamp: U256, mr_enclave: [u8; 32], ) -> ContractCall<M, ()>

Calls the contract’s verifyEnclave (0xef0ebd71) function

Source

pub fn verify_function_result( &self, params: FunctionVerifyParams, ) -> ContractCall<M, ()>

Calls the contract’s verifyFunctionResult (0x3bd7b617) function

Source

pub fn view_aggregator_results( &self, aggregator_id: Address, ) -> ContractCall<M, Vec<Result>>

Calls the contract’s viewAggregatorResults (0xde866484) function

Source

pub fn view_latest_result( &self, aggregator_id: Address, ) -> ContractCall<M, (I256, U256)>

Calls the contract’s viewLatestResult (0xbdf5edef) function

Source

pub fn add_mr_enclave_filter(&self) -> Event<Arc<M>, M, AddMrEnclaveFilter>

Gets the contract’s AddMrEnclave event

Source

pub fn aggregator_account_init_filter( &self, ) -> Event<Arc<M>, M, AggregatorAccountInitFilter>

Gets the contract’s AggregatorAccountInit event

Source

pub fn aggregator_fund_event_filter( &self, ) -> Event<Arc<M>, M, AggregatorFundEventFilter>

Gets the contract’s AggregatorFundEvent event

Source

pub fn aggregator_interval_refreshed_filter( &self, ) -> Event<Arc<M>, M, AggregatorIntervalRefreshedFilter>

Gets the contract’s AggregatorIntervalRefreshed event

Source

pub fn aggregator_open_interval_filter( &self, ) -> Event<Arc<M>, M, AggregatorOpenIntervalFilter>

Gets the contract’s AggregatorOpenInterval event

Source

pub fn aggregator_read_filter(&self) -> Event<Arc<M>, M, AggregatorReadFilter>

Gets the contract’s AggregatorRead event

Source

pub fn aggregator_save_result_filter( &self, ) -> Event<Arc<M>, M, AggregatorSaveResultFilter>

Gets the contract’s AggregatorSaveResult event

Source

pub fn aggregator_settings_updated_filter( &self, ) -> Event<Arc<M>, M, AggregatorSettingsUpdatedFilter>

Gets the contract’s AggregatorSettingsUpdated event

Source

pub fn aggregator_update_filter( &self, ) -> Event<Arc<M>, M, AggregatorUpdateFilter>

Gets the contract’s AggregatorUpdate event

Source

pub fn aggregator_withdraw_event_filter( &self, ) -> Event<Arc<M>, M, AggregatorWithdrawEventFilter>

Gets the contract’s AggregatorWithdrawEvent event

Source

pub fn approval_filter(&self) -> Event<Arc<M>, M, ApprovalFilter>

Gets the contract’s Approval event

Source

pub fn attestation_queue_account_init_filter( &self, ) -> Event<Arc<M>, M, AttestationQueueAccountInitFilter>

Gets the contract’s AttestationQueueAccountInit event

Source

pub fn attestation_queue_permission_updated_filter( &self, ) -> Event<Arc<M>, M, AttestationQueuePermissionUpdatedFilter>

Gets the contract’s AttestationQueuePermissionUpdated event

Source

pub fn attestation_queue_set_config_filter( &self, ) -> Event<Arc<M>, M, AttestationQueueSetConfigFilter>

Gets the contract’s AttestationQueueSetConfig event

Source

pub fn diamond_cut_filter(&self) -> Event<Arc<M>, M, DiamondCutFilter>

Gets the contract’s DiamondCut event

Source

pub fn enclave_account_init_filter( &self, ) -> Event<Arc<M>, M, EnclaveAccountInitFilter>

Gets the contract’s EnclaveAccountInit event

Source

pub fn enclave_gc_filter(&self) -> Event<Arc<M>, M, EnclaveGCFilter>

Gets the contract’s EnclaveGC event

Source

pub fn enclave_heartbeat_filter( &self, ) -> Event<Arc<M>, M, EnclaveHeartbeatFilter>

Gets the contract’s EnclaveHeartbeat event

Source

pub fn enclave_payout_event_filter( &self, ) -> Event<Arc<M>, M, EnclavePayoutEventFilter>

Gets the contract’s EnclavePayoutEvent event

Source

pub fn enclave_rotate_signer_filter( &self, ) -> Event<Arc<M>, M, EnclaveRotateSignerFilter>

Gets the contract’s EnclaveRotateSigner event

Source

pub fn enclave_verify_request_filter( &self, ) -> Event<Arc<M>, M, EnclaveVerifyRequestFilter>

Gets the contract’s EnclaveVerifyRequest event

Source

pub fn function_account_init_filter( &self, ) -> Event<Arc<M>, M, FunctionAccountInitFilter>

Gets the contract’s FunctionAccountInit event

Source

pub fn function_call_event_filter( &self, ) -> Event<Arc<M>, M, FunctionCallEventFilter>

Gets the contract’s FunctionCallEvent event

Source

pub fn function_call_fund_filter( &self, ) -> Event<Arc<M>, M, FunctionCallFundFilter>

Gets the contract’s FunctionCallFund event

Source

pub fn function_fund_filter(&self) -> Event<Arc<M>, M, FunctionFundFilter>

Gets the contract’s FunctionFund event

Source

pub fn function_withdraw_filter( &self, ) -> Event<Arc<M>, M, FunctionWithdrawFilter>

Gets the contract’s FunctionWithdraw event

Source

pub fn oracle_account_init_filter( &self, ) -> Event<Arc<M>, M, OracleAccountInitFilter>

Gets the contract’s OracleAccountInit event

Source

pub fn oracle_gc_filter(&self) -> Event<Arc<M>, M, OracleGCFilter>

Gets the contract’s OracleGC event

Source

pub fn oracle_heartbeat_filter(&self) -> Event<Arc<M>, M, OracleHeartbeatFilter>

Gets the contract’s OracleHeartbeat event

Source

pub fn oracle_payout_event_filter( &self, ) -> Event<Arc<M>, M, OraclePayoutEventFilter>

Gets the contract’s OraclePayoutEvent event

Source

pub fn oracle_queue_account_init_filter( &self, ) -> Event<Arc<M>, M, OracleQueueAccountInitFilter>

Gets the contract’s OracleQueueAccountInit event

Source

pub fn oracle_queue_add_mr_enclave_filter( &self, ) -> Event<Arc<M>, M, OracleQueueAddMrEnclaveFilter>

Gets the contract’s OracleQueueAddMrEnclave event

Source

pub fn oracle_queue_remove_mr_enclave_filter( &self, ) -> Event<Arc<M>, M, OracleQueueRemoveMrEnclaveFilter>

Gets the contract’s OracleQueueRemoveMrEnclave event

Source

pub fn oracle_queue_set_attestation_config_filter( &self, ) -> Event<Arc<M>, M, OracleQueueSetAttestationConfigFilter>

Gets the contract’s OracleQueueSetAttestationConfig event

Source

pub fn oracle_queue_set_config_filter( &self, ) -> Event<Arc<M>, M, OracleQueueSetConfigFilter>

Gets the contract’s OracleQueueSetConfig event

Source

pub fn oracle_queue_set_permission_filter( &self, ) -> Event<Arc<M>, M, OracleQueueSetPermissionFilter>

Gets the contract’s OracleQueueSetPermission event

Source

pub fn oracle_rotate_signer_filter( &self, ) -> Event<Arc<M>, M, OracleRotateSignerFilter>

Gets the contract’s OracleRotateSigner event

Source

pub fn oracle_set_config_filter( &self, ) -> Event<Arc<M>, M, OracleSetConfigFilter>

Gets the contract’s OracleSetConfig event

Source

pub fn ownership_transferred_filter( &self, ) -> Event<Arc<M>, M, OwnershipTransferredFilter>

Gets the contract’s OwnershipTransferred event

Source

pub fn remove_mr_enclave_filter( &self, ) -> Event<Arc<M>, M, RemoveMrEnclaveFilter>

Gets the contract’s RemoveMrEnclave event

Source

pub fn request_event_filter(&self) -> Event<Arc<M>, M, RequestEventFilter>

Gets the contract’s RequestEvent event

Source

pub fn request_fund_filter(&self) -> Event<Arc<M>, M, RequestFundFilter>

Gets the contract’s RequestFund event

Source

pub fn request_withdraw_filter(&self) -> Event<Arc<M>, M, RequestWithdrawFilter>

Gets the contract’s RequestWithdraw event

Source

pub fn routine_created_filter(&self) -> Event<Arc<M>, M, RoutineCreatedFilter>

Gets the contract’s RoutineCreated event

Source

pub fn routine_fund_filter(&self) -> Event<Arc<M>, M, RoutineFundFilter>

Gets the contract’s RoutineFund event

Source

pub fn routine_withdraw_filter(&self) -> Event<Arc<M>, M, RoutineWithdrawFilter>

Gets the contract’s RoutineWithdraw event

Source

pub fn stake_added_filter(&self) -> Event<Arc<M>, M, StakeAddedFilter>

Gets the contract’s StakeAdded event

Source

pub fn stake_removed_filter(&self) -> Event<Arc<M>, M, StakeRemovedFilter>

Gets the contract’s StakeRemoved event

Source

pub fn transfer_filter(&self) -> Event<Arc<M>, M, TransferFilter>

Gets the contract’s Transfer event

Source

pub fn unstaked_filter(&self) -> Event<Arc<M>, M, UnstakedFilter>

Gets the contract’s Unstaked event

Source

pub fn verify_failed_filter(&self) -> Event<Arc<M>, M, VerifyFailedFilter>

Gets the contract’s VerifyFailed event

Source

pub fn events(&self) -> Event<Arc<M>, M, SwitchboardEvents>

Returns an Event builder for all the events of this contract.

Methods from Deref<Target = Contract<M>>§

Source

pub fn address(&self) -> H160

Returns the contract’s address

Source

pub fn abi(&self) -> &Contract

Returns a reference to the contract’s ABI.

Source

pub fn client(&self) -> B
where B: Clone,

Returns a pointer to the contract’s client.

Source

pub fn client_ref(&self) -> &M

Returns a reference to the contract’s client.

Source

pub fn connect<N>(&self, client: Arc<N>) -> ContractInstance<Arc<N>, N>
where N: Middleware,

Returns a new contract instance using the provided client

Clones self internally

Source

pub fn connect_with<C, N>(&self, client: C) -> ContractInstance<C, N>
where C: Borrow<N>,

Returns a new contract instance using the provided client

Clones self internally

Source

pub fn event_with_filter<D>(&self, filter: Filter) -> Event<B, M, D>

Returns an Event builder with the provided filter.

Source

pub fn event<D>(&self) -> Event<B, M, D>
where D: EthEvent,

Returns an Event builder for the provided event.

Source

pub fn event_for_name<D>(&self, name: &str) -> Result<Event<B, M, D>, Error>

Returns an Event builder with the provided name.

Source

pub fn method_hash<T, D>( &self, signature: [u8; 4], args: T, ) -> Result<FunctionCall<B, M, D>, AbiError>
where T: Tokenize, D: Detokenize,

Returns a transaction builder for the selected function signature. This should be preferred if there are overloaded functions in your smart contract

Source

pub fn method<T, D>( &self, name: &str, args: T, ) -> Result<FunctionCall<B, M, D>, AbiError>
where T: Tokenize, D: Detokenize,

Returns a transaction builder for the provided function name. If there are multiple functions with the same name due to overloading, consider using the method_hash method instead, since this will use the first match.

Source

pub fn at<T>(&self, address: T) -> ContractInstance<B, M>
where T: Into<H160>,

Returns a new contract instance at address.

Clones self internally

Methods from Deref<Target = BaseContract>§

Source

pub fn encode<T>(&self, name: &str, args: T) -> Result<Bytes, AbiError>
where T: Tokenize,

Returns the ABI encoded data for the provided function and arguments

If the function exists multiple times and you want to use one of the overloaded versions, consider using encode_with_selector

Source

pub fn encode_with_selector<T>( &self, signature: [u8; 4], args: T, ) -> Result<Bytes, AbiError>
where T: Tokenize,

Returns the ABI encoded data for the provided function selector and arguments

Source

pub fn decode<D, T>(&self, name: &str, bytes: T) -> Result<D, AbiError>
where D: Detokenize, T: AsRef<[u8]>,

Decodes the provided ABI encoded function arguments with the selected function name.

If the function exists multiple times and you want to use one of the overloaded versions, consider using decode_with_selector

Source

pub fn decode_raw<T>( &self, name: &str, bytes: T, ) -> Result<Vec<Token>, AbiError>
where T: AsRef<[u8]>,

Decodes the provided ABI encoded function arguments with the selected function name.

If the function exists multiple times and you want to use one of the overloaded versions, consider using decode_with_selector

Returns a Token vector, which lets you decode function arguments dynamically without knowing the return type.

Source

pub fn decode_output<D, T>(&self, name: &str, bytes: T) -> Result<D, AbiError>
where D: Detokenize, T: AsRef<[u8]>,

Decodes the provided ABI encoded function output with the selected function name.

If the function exists multiple times and you want to use one of the overloaded versions, consider using decode_with_selector

Source

pub fn decode_output_raw<T>( &self, name: &str, bytes: T, ) -> Result<Vec<Token>, AbiError>
where T: AsRef<[u8]>,

Decodes the provided ABI encoded function output with the selected function name.

If the function exists multiple times and you want to use one of the overloaded versions, consider using decode_with_selector

Returns a Token vector, which lets you decode function arguments dynamically without knowing the return type.

Source

pub fn decode_event<D>( &self, name: &str, topics: Vec<H256>, data: Bytes, ) -> Result<D, AbiError>
where D: Detokenize,

Decodes for a given event name, given the log.topics and log.data fields from the transaction receipt

Source

pub fn decode_event_raw( &self, name: &str, topics: Vec<H256>, data: Bytes, ) -> Result<Vec<Token>, AbiError>

Decodes for a given event name, given the log.topics and log.data fields from the transaction receipt

Returns a Token vector, which lets you decode function arguments dynamically without knowing the return type.

Source

pub fn decode_with_selector_raw<T>( &self, signature: [u8; 4], bytes: T, ) -> Result<Vec<Token>, AbiError>
where T: AsRef<[u8]>,

Decodes the provided ABI encoded bytes with the selected function selector

Returns a Token vector, which lets you decode function arguments dynamically without knowing the return type.

Source

pub fn decode_with_selector<D, T>( &self, signature: [u8; 4], bytes: T, ) -> Result<D, AbiError>
where D: Detokenize, T: AsRef<[u8]>,

Decodes the provided ABI encoded bytes with the selected function selector

Source

pub fn decode_input_raw<T>(&self, bytes: T) -> Result<Vec<Token>, AbiError>
where T: AsRef<[u8]>,

Decodes the provided ABI encoded input bytes

Returns a Token vector, which lets you decode function arguments dynamically without knowing the return type.

Source

pub fn decode_input<D, T>(&self, bytes: T) -> Result<D, AbiError>
where D: Detokenize, T: AsRef<[u8]>,

Decodes the provided ABI encoded input bytes

Source

pub fn decode_output_with_selector<D, T>( &self, signature: [u8; 4], bytes: T, ) -> Result<D, AbiError>
where D: Detokenize, T: AsRef<[u8]>,

Decode the provided ABI encoded bytes as the output of the provided function selector

Source

pub fn decode_output_with_selector_raw<T>( &self, signature: [u8; 4], bytes: T, ) -> Result<Vec<Token>, AbiError>
where T: AsRef<[u8]>,

Decodes the provided ABI encoded bytes with the selected function selector

Returns a Token vector, which lets you decode function arguments dynamically without knowing the return type.

Source

pub fn abi(&self) -> &Contract

Returns a reference to the contract’s ABI

Trait Implementations§

Source§

impl<M> Clone for Switchboard<M>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<M> Debug for Switchboard<M>

Source§

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

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

impl<M> Deref for Switchboard<M>

Source§

type Target = ContractInstance<Arc<M>, M>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<M> DerefMut for Switchboard<M>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<M: Middleware> From<ContractInstance<Arc<M>, M>> for Switchboard<M>

Source§

fn from(contract: Contract<M>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<M> Freeze for Switchboard<M>

§

impl<M> RefUnwindSafe for Switchboard<M>
where M: RefUnwindSafe,

§

impl<M> Send for Switchboard<M>
where M: Sync + Send,

§

impl<M> Sync for Switchboard<M>
where M: Sync + Send,

§

impl<M> Unpin for Switchboard<M>
where M: Unpin,

§

impl<M> UnwindSafe for Switchboard<M>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .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
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .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
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
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<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<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> JsonSchemaMaybe for T