RenegadeClient

Struct RenegadeClient 

Source
pub struct RenegadeClient {
    pub config: RenegadeClientConfig,
    pub secrets: AccountSecrets,
    pub relayer_client: RelayerHttpClient,
    pub admin_relayer_client: Option<RelayerHttpClient>,
    pub historical_state_client: Arc<RelayerHttpClient>,
    pub websocket_client: RenegadeWebsocketClient,
}
Expand description

The Renegade wallet client

Fields§

§config: RenegadeClientConfig

The client config

§secrets: AccountSecrets

The account secrets

§relayer_client: RelayerHttpClient

The relayer HTTP client

§admin_relayer_client: Option<RelayerHttpClient>

The admin relayer HTTP client

§historical_state_client: Arc<RelayerHttpClient>

The historical state HTTP client.

Also a RelayerHttpClient as it mirrors the relayer’s historical state API.

§websocket_client: RenegadeWebsocketClient

The websocket client

Implementations§

Source§

impl RenegadeClient

Source

pub async fn admin_assign_order_to_pool( &self, _order_id: Uuid, _matching_pool: String, ) -> Result<(), RenegadeClientError>

Assigns an order to a specific matching pool via the admin API.

This is an admin action that requires the client to be configured with an admin HMAC key.

Source§

impl RenegadeClient

Source

pub async fn admin_create_matching_pool( &self, matching_pool: String, ) -> Result<(), RenegadeClientError>

Creates a new matching pool via the admin API.

Orders can only be matched with other orders in the same matching pool. If the specified matching pool already exists, this is a no-op.

This is an admin action that requires the client to be configured with an admin HMAC key.

Source§

impl RenegadeClient

Source

pub async fn admin_get_account_orders( &self, account_id: Uuid, ) -> Result<Vec<ApiAdminOrder>, RenegadeClientError>

Fetches all orders for the given account (admin).

This method will paginate through all of the account’s orders across multiple requests, returning them all.

Source§

impl RenegadeClient

Source

pub async fn admin_get_open_orders( &self, ) -> Result<Vec<ApiAdminOrder>, RenegadeClientError>

Fetches all open orders managed by the relayer.

This method will paginate through all of the orders across multiple requests, returning them all.

Source

pub async fn admin_get_open_orders_in_matching_pool( &self, matching_pool: String, ) -> Result<Vec<ApiAdminOrder>, RenegadeClientError>

Fetches all open orders managed by the relayer in the given matching pool.

This method will paginate through all of the orders across multiple requests, returning them all.

Source§

impl RenegadeClient

Source

pub async fn admin_get_order( &self, order_id: Uuid, ) -> Result<ApiAdminOrder, RenegadeClientError>

Look up an order by its ID

Source§

impl RenegadeClient

Source

pub async fn admin_is_task_queue_paused( &self, account_id: Uuid, ) -> Result<bool, RenegadeClientError>

Check if the given account’s task queue is paused

Source§

impl RenegadeClient

Source

pub fn new_admin_order_builder(&self) -> AdminOrderBuilder

Create a new admin order builder with the client’s account address as the owner

Source

pub async fn admin_place_order_in_pool( &self, built_order: BuiltAdminOrder, ) -> Result<(), RenegadeClientError>

Places an order in a specific matching pool via the admin API. Waits for the order creation task to complete before returning.

This is an admin action that requires the client to be configured with an admin HMAC key.

Source

pub async fn enqueue_admin_order_placement_in_pool( &self, built_order: BuiltAdminOrder, ) -> Result<TaskWaiter, RenegadeClientError>

Enqueues an order placement task in a specific matching pool via the admin API. Returns the expected order to be created, and a TaskWaiter that can be used to await task completion.

This is an admin action that requires the client to be configured with an admin HMAC key.

Source§

impl RenegadeClient

Source

pub fn build_erc20_approval_tx( &self, token: Address, amount: U256, ) -> TransactionRequest

Build a transaction to approve the Permit2 contract as a spender for the given ERC20 token.

§Arguments
  • token - The ERC20 token address to approve
  • amount - The amount to approve for spending
§Returns

A TransactionRequest that can be executed by the user with their provider

Source

pub fn build_permit2_allowance_tx( &self, token: Address, amount: U160, expiration: U48, ) -> TransactionRequest

Build a transaction to approve the darkpool as a spender through Permit2’s AllowanceTransfer interface.

§Arguments
  • token - The ERC20 token address to approve
  • amount - The amount to approve for spending (uint160)
  • expiration - The Unix timestamp when this approval expires (uint48)
§Returns

A TransactionRequest that can be executed by the user with their provider

Source§

impl RenegadeClient

Source

pub async fn cancel_order( &self, order_id: Uuid, ) -> Result<(), RenegadeClientError>

Cancels the order with the given ID. Waits for the order cancellation task to complete before returning.

Source

pub async fn enqueue_order_cancellation( &self, order_id: Uuid, ) -> Result<TaskWaiter, RenegadeClientError>

Enqueues an order cancellation task in the relayer. Returns a TaskWaiter that can be used to await task completion.

Source§

impl RenegadeClient

Source

pub async fn create_account(&self) -> Result<(), RenegadeClientError>

Create an account with the relayer.

This method will register the account credentials with the relayer, but will not yet result in any state being committed onchain in the darkpool.

Source§

impl RenegadeClient

Source

pub async fn deposit( &self, mint: Address, amount: Amount, ) -> Result<(), RenegadeClientError>

Deposit funds into an account balance. Waits for the deposit task to complete before returning the post-deposit balance.

Source

pub async fn enqueue_deposit( &self, mint: Address, amount: Amount, ) -> Result<TaskWaiter, RenegadeClientError>

Enqueues a deposit task in the relayer. Returns the post-deposit balance, and a TaskWaiter that can be used to await task completion.

Source§

impl RenegadeClient

Source

pub async fn get_account(&self) -> Result<ApiAccount, RenegadeClientError>

Look up an account by its ID

Returns the account’s orders and balances

Source§

impl RenegadeClient

Source

pub async fn get_account_seeds( &self, ) -> Result<(PoseidonCSPRNG, PoseidonCSPRNG), RenegadeClientError>

Get an account’s seed CSPRNG states from the relayer. These are the CSPRNGs used to sample seeds with which to create new state objects.

Returns a tuple of (recovery stream seeds CSPRNG, share stream seeds CSPRNG)

Source§

impl RenegadeClient

Source

pub async fn get_balance_by_mint( &self, mint: Address, ) -> Result<ApiBalance, RenegadeClientError>

Get the account’s balance for a given mint

Source§

impl RenegadeClient

Source

pub async fn get_balances(&self) -> Result<Vec<ApiBalance>, RenegadeClientError>

Fetches all balances in the account.

Source§

impl RenegadeClient

Source

pub async fn get_order( &self, order_id: Uuid, ) -> Result<ApiOrder, RenegadeClientError>

Look up an order by its ID

Source§

impl RenegadeClient

Source

pub async fn get_orders( &self, include_historic_orders: bool, ) -> Result<Vec<ApiOrder>, RenegadeClientError>

Fetches all orders in the account, optionally including historic (inactive) orders.

This method will paginate through all of the account’s orders across multiple requests, returning them all.

Source§

impl RenegadeClient

Source

pub async fn get_task( &self, task_id: Uuid, ) -> Result<ApiTask, RenegadeClientError>

Look up a task by its ID

Source§

impl RenegadeClient

Source

pub async fn get_tasks( &self, include_historic_tasks: bool, ) -> Result<Vec<ApiTask>, RenegadeClientError>

Fetches all tasks in the account, optionally including historic tasks.

This method will paginate through all of the account’s tasks across multiple requests, returning them all.

Source§

impl RenegadeClient

Source

pub fn new_order_builder(&self) -> OrderBuilder

Create a new order builder with the client’s account address as the owner

Source

pub async fn place_order( &self, built_order: BuiltOrder, ) -> Result<(), RenegadeClientError>

Places an order via the relayer. Waits for the order creation task to complete before returning the created order.

Orders will only be committed to onchain state upon their first fill. As such, this method alone just registers this order as an intent to trade with the relayer.

Source

pub async fn enqueue_order_placement( &self, built_order: BuiltOrder, ) -> Result<TaskWaiter, RenegadeClientError>

Enqueues an order placement task in the relayer. Returns the expected order to be created, and a TaskWaiter that can be used to await task completion.

Orders will only be committed to onchain state upon their first fill. As such, this method alone just registers this order as an intent to trade with the relayer.

Source§

impl RenegadeClient

Source

pub async fn sync_account(&self) -> Result<(), RenegadeClientError>

Sync an account with onchain state. Awaits the completion of the sync task before returning.

Source

pub async fn enqueue_sync_account( &self, ) -> Result<TaskWaiter, RenegadeClientError>

Enqueues a sync task in the relayer. Returns a TaskWaiter that can be used to await task completion.

Source§

impl RenegadeClient

Source

pub async fn update_order( &self, order_update_config: OrderUpdateConfig, ) -> Result<ApiOrder, RenegadeClientError>

Updates an order.

Currently, the only parameters which can updated are the order’s min_fill_size, and whether to allow_external_matches.

Source§

impl RenegadeClient

Source

pub async fn withdraw( &self, mint: Address, amount: Amount, ) -> Result<(), RenegadeClientError>

Withdraw funds from an account balance. Waits for the withdrawal task to complete before returning.

Source

pub async fn enqueue_withdrawal( &self, mint: Address, amount: Amount, ) -> Result<TaskWaiter, RenegadeClientError>

Enqueues a withdrawal task in the relayer. Returns a TaskWaiter that can be used to await task completion.

Source§

impl RenegadeClient

Source

pub fn new(config: RenegadeClientConfig) -> Result<Self, RenegadeClientError>

Derive the wallet secrets from an ethereum private key

Source

pub fn new_arbitrum_sepolia( key: &PrivateKeySigner, ) -> Result<Self, RenegadeClientError>

Create a new wallet on Arbitrum Sepolia

Source

pub fn new_arbitrum_sepolia_admin( key: &PrivateKeySigner, admin_hmac_key: HmacKey, ) -> Result<Self, RenegadeClientError>

Create a new admin wallet on Arbitrum Sepolia

Source

pub fn new_arbitrum_one( key: &PrivateKeySigner, ) -> Result<Self, RenegadeClientError>

Create a new wallet on Arbitrum One

Source

pub fn new_arbitrum_one_admin( key: &PrivateKeySigner, admin_hmac_key: HmacKey, ) -> Result<Self, RenegadeClientError>

Create a new admin wallet on Arbitrum One

Source

pub fn new_base_sepolia( key: &PrivateKeySigner, ) -> Result<Self, RenegadeClientError>

Create a new wallet on Base Sepolia

Source

pub fn new_base_sepolia_admin( key: &PrivateKeySigner, admin_hmac_key: HmacKey, ) -> Result<Self, RenegadeClientError>

Create a new admin wallet on Base Sepolia

Source

pub fn new_base_mainnet( key: &PrivateKeySigner, ) -> Result<Self, RenegadeClientError>

Create a new wallet on Base Mainnet

Source

pub fn new_ethereum_sepolia_admin( key: &PrivateKeySigner, admin_hmac_key: HmacKey, ) -> Result<Self, RenegadeClientError>

Create a new admin wallet on Ethereum Sepolia

Source

pub fn new_ethereum_sepolia( key: &PrivateKeySigner, ) -> Result<Self, RenegadeClientError>

Create a new admin wallet on Ethereum Sepolia

Source

pub fn new_base_mainnet_admin( key: &PrivateKeySigner, admin_hmac_key: HmacKey, ) -> Result<Self, RenegadeClientError>

Create a new admin wallet on Base Mainnet

Source

pub fn is_solidity_chain(&self) -> bool

Whether the client is on a chain in which Renegade is deployed as a solidity contract

Source

pub async fn watch_task( &self, task_id: Uuid, timeout: Duration, ) -> Result<TaskWaiter, RenegadeClientError>

Create a TaskWaiter which can be used to watch a task until it completes or times out

Source

pub async fn subscribe_task_updates( &self, ) -> Result<impl Stream<Item = TaskUpdateMessage>, RenegadeClientError>

Subscribe to the account’s task updates stream

Source

pub async fn subscribe_balance_updates( &self, ) -> Result<impl Stream<Item = BalanceUpdateMessage>, RenegadeClientError>

Subscribe to the account’s balance updates stream

Source

pub async fn subscribe_order_updates( &self, ) -> Result<impl Stream<Item = OrderUpdateMessage>, RenegadeClientError>

Subscribe to the account’s order updates stream

Source

pub async fn subscribe_fills( &self, ) -> Result<impl Stream<Item = FillMessage>, RenegadeClientError>

Subscribe to the account’s fills stream

Source

pub async fn subscribe_admin_balance_updates( &self, ) -> Result<impl Stream<Item = AdminBalanceUpdateMessage>, RenegadeClientError>

Subscribe to the admin balances updates stream

Source

pub async fn subscribe_admin_order_updates( &self, ) -> Result<impl Stream<Item = AdminOrderUpdateMessage>, RenegadeClientError>

Subscribe to the admin order updates stream

Source

pub fn get_admin_client( &self, ) -> Result<&RelayerHttpClient, RenegadeClientError>

Get a reference to the admin relayer client, returning an error if one has not been configured.

Source

pub fn get_account_id(&self) -> Uuid

Get the ID of the account

Source

pub fn get_master_view_seed(&self) -> Scalar

Get the master view seed

Source

pub fn get_auth_hmac_key(&self) -> HmacKey

Get the HMAC key used to authenticate account API actions

Source

pub fn get_account_signer(&self) -> &PrivateKeySigner

Get the signing key client is configured with

Source

pub fn get_account_address(&self) -> Address

Get the address of the account associated with the private key the client is configured with

Source

pub fn schnorr_sign<T: BaseType>( &self, message: &T, ) -> Result<SchnorrSignature, RenegadeClientError>

Get the Schnorr private key client is configured with

Source

pub fn get_schnorr_public_key(&self) -> SchnorrPublicKey

Get the public key associated with the Schnorr private key the client is configured with

Source

pub fn get_executor_address(&self) -> Address

Get the relayer’s executor address, which it uses to sign public order settlement obligations

Source

pub fn get_relayer_fee_recipient(&self) -> Address

Get the relayer’s fee recipient address

Source

pub fn get_chain_id(&self) -> u64

Get the chain ID the client is configured for

Source

pub fn get_permit2_address(&self) -> Address

Get the permit2 address the client is configured for

Source

pub fn get_darkpool_address(&self) -> Address

Get the darkpool address the client is configured for

Trait Implementations§

Source§

impl Clone for RenegadeClient

Source§

fn clone(&self) -> RenegadeClient

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

Auto Trait Implementations§

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
§

impl<T> Conv for T

§

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

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

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> FmtForward for T

§

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

§

impl<T> Instrument for T

§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

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

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

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

§

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
§

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
§

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
§

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
§

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
§

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.
§

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.
§

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.
§

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.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

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

Immutable access to a value. Read more
§

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

Mutable access to a value. Read more
§

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
§

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
§

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
§

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
§

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
§

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
§

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

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

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

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

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.
§

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.
§

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.
§

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.
§

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.
§

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
§

impl<T> TryConv for T

§

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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> RkyvBound for T