Client

Struct Client 

Source
pub struct Client { /* private fields */ }
Expand description

Client for Privy API

Version: 0.0.1

Implementations§

Source§

impl Client

Source

pub fn new(baseurl: &str) -> Self

Create a new client.

baseurl is the base URL provided to the internal reqwest::Client, and should include a scheme and hostname, as well as port and a path stem if applicable.

Source

pub fn new_with_client(baseurl: &str, client: Client) -> Self

Construct a new client with an existing reqwest::Client, allowing more control over its configuration.

baseurl is the base URL provided to the internal reqwest::Client, and should include a scheme and hostname, as well as port and a path stem if applicable.

Source§

impl Client

Source

pub async fn get_wallets<'a>( &'a self, chain_type: Option<GetWalletsChainType>, cursor: Option<&'a GetWalletsCursor>, limit: Option<f64>, user_id: Option<&'a str>, ) -> Result<ResponseValue<GetWalletsResponse>, Error<()>>

Get all wallets

Get all wallets in your app.

Sends a GET request to /v1/wallets

Source

pub async fn create_wallet<'a>( &'a self, privy_idempotency_key: Option<&'a str>, body: &'a CreateWalletBody, ) -> Result<ResponseValue<Wallet>, Error<()>>

Create wallet

Create a new wallet.

Sends a POST request to /v1/wallets

Source

pub async fn wallet_rpc<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_idempotency_key: Option<&'a str>, body: &'a WalletRpcBody, ) -> Result<ResponseValue<WalletRpcResponse>, Error<()>>

Create a signature or transaction

Sign a message or transaction with a wallet by wallet ID.

Sends a POST request to /v1/wallets/{wallet_id}/rpc

Source

pub async fn get_wallet<'a>( &'a self, wallet_id: &'a str, ) -> Result<ResponseValue<Wallet>, Error<()>>

Get wallet

Get a wallet by wallet ID.

Sends a GET request to /v1/wallets/{wallet_id}

Source

pub async fn update_wallet<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, body: &'a UpdateWalletBody, ) -> Result<ResponseValue<Wallet>, Error<()>>

Update wallet

Update a wallet’s policies or authorization key configuration.

Sends a PATCH request to /v1/wallets/{wallet_id}

Source

pub async fn raw_sign<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_idempotency_key: Option<&'a str>, body: &'a RawSign, ) -> Result<ResponseValue<RawSignResponse>, Error<()>>

Raw sign

Sign a message with a wallet by wallet ID.

Sends a POST request to /v1/wallets/{wallet_id}/raw_sign

Source

pub async fn get_wallet_balance<'a>( &'a self, wallet_id: &'a str, asset: &'a GetWalletBalanceAsset, chain: &'a GetWalletBalanceChain, include_currency: Option<GetWalletBalanceIncludeCurrency>, ) -> Result<ResponseValue<GetWalletBalanceResponse>, Error<()>>

Get balance

Get the balance of a wallet by wallet ID.

Sends a GET request to /v1/wallets/{wallet_id}/balance

Source

pub async fn wallet_transactions<'a>( &'a self, wallet_id: &'a str, asset: &'a WalletTransactionsAsset, chain: WalletTransactionsChain, cursor: Option<&'a WalletTransactionsCursor>, limit: Option<f64>, ) -> Result<ResponseValue<WalletTransactionsResponse>, Error<()>>

Get transactions

Get incoming and outgoing transactions of a wallet by wallet ID.

Sends a GET request to /v1/wallets/{wallet_id}/transactions

Source

pub async fn authenticate<'a>( &'a self, body: &'a AuthenticateBody, ) -> Result<ResponseValue<AuthenticateResponse>, Error<()>>

Obtain a session key to enable wallet access

Obtain a session key to enable wallet access.

Sends a POST request to /v1/wallets/authenticate

Source

pub async fn wallet_import_init<'a>( &'a self, body: &'a WalletImportInitializationRequest, ) -> Result<ResponseValue<WalletImportInitializationResponse>, Error<()>>

Initialize import

Initialize a wallet import. Complete by submitting the import.

Sends a POST request to /v1/wallets/import/init

Source

pub async fn wallet_import_submit<'a>( &'a self, body: &'a WalletImportSubmissionRequest, ) -> Result<ResponseValue<Wallet>, Error<()>>

Submit import

Submit a wallet import request.

Sends a POST request to /v1/wallets/import/submit

Source

pub async fn wallet_export<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, body: &'a WalletExportRequestBody, ) -> Result<ResponseValue<WalletExportResponseBody>, Error<()>>

Export wallet

Export a wallet’s private key

Sends a POST request to /v1/wallets/{wallet_id}/export

Source

pub async fn get_users<'a>( &'a self, cursor: Option<&'a GetUsersCursor>, limit: Option<f64>, ) -> Result<ResponseValue<GetUsersResponse>, Error<()>>

Gets Users

Get all users in your app.

Sends a GET request to /v1/users

Source

pub async fn create_user<'a>( &'a self, body: &'a CreateUserBody, ) -> Result<ResponseValue<User>, Error<()>>

Create User

Create a new user with linked accounts. Optionally pre-generate embedded wallets for the user.

Sends a POST request to /v1/users

Source

pub async fn get_user<'a>( &'a self, user_id: &'a str, ) -> Result<ResponseValue<User>, Error<()>>

Get User

Get a user by user ID.

Sends a GET request to /v1/users/{user_id}

Source

pub async fn delete_user<'a>( &'a self, user_id: &'a str, ) -> Result<ResponseValue<()>, Error<ByteStream>>

Delete User

Delete a user by user ID.

Sends a DELETE request to /v1/users/{user_id}

Source

pub async fn update_user_custom_metadata<'a>( &'a self, user_id: &'a str, body: &'a UpdateUserCustomMetadataBody, ) -> Result<ResponseValue<User>, Error<()>>

Create Custom Metadata

Adds custom metadata to a user by user ID.

Sends a POST request to /v1/users/{user_id}/custom_metadata

Source

pub async fn look_up_user_by_email<'a>( &'a self, body: &'a LookUpUserByEmailBody, ) -> Result<ResponseValue<User>, Error<()>>

Lookup User by Email Address

Looks up a user by their email address.

Sends a POST request to /v1/users/email/address

Source

pub async fn look_up_user_by_custom_auth_id<'a>( &'a self, body: &'a LookUpUserByCustomAuthIdBody, ) -> Result<ResponseValue<User>, Error<()>>

Lookup User by Custom Auth ID

Looks up a user by their custom auth ID.

Sends a POST request to /v1/users/custom_auth/id

Source

pub async fn look_up_user_by_wallet_address<'a>( &'a self, body: &'a LookUpUserByWalletAddressBody, ) -> Result<ResponseValue<User>, Error<()>>

Lookup User by wallet address

Looks up a user by their wallet address.

Sends a POST request to /v1/users/wallet/address

Source

pub async fn look_up_user_by_farcaster_id<'a>( &'a self, body: &'a LookUpUserByFarcasterIdBody, ) -> Result<ResponseValue<User>, Error<()>>

Lookup User by Farcaster ID

Looks up a user by their Farcaster ID.

Sends a POST request to /v1/users/farcaster/fid

Source

pub async fn look_up_user_by_phone_number<'a>( &'a self, body: &'a LookUpUserByPhoneNumberBody, ) -> Result<ResponseValue<User>, Error<()>>

Lookup User by Phone Number

Looks up a user by their phone number.

Sends a POST request to /v1/users/phone/number

Source

pub async fn look_up_user_by_smart_wallet_address<'a>( &'a self, body: &'a LookUpUserBySmartWalletAddressBody, ) -> Result<ResponseValue<User>, Error<()>>

Lookup User by Smart Wallet Address

Looks up a user by their smart wallet address.

Sends a POST request to /v1/users/smart_wallet/address

Source

pub async fn look_up_user_by_discord_username<'a>( &'a self, body: &'a LookUpUserByDiscordUsernameBody, ) -> Result<ResponseValue<User>, Error<()>>

Lookup User by Discord Username

Looks up a user by their Discord username.

Sends a POST request to /v1/users/discord/username

Source

pub async fn look_up_user_by_github_username<'a>( &'a self, body: &'a LookUpUserByGithubUsernameBody, ) -> Result<ResponseValue<User>, Error<()>>

Lookup User by Github Username

Looks up a user by their Github username.

Sends a POST request to /v1/users/github/username

Source

pub async fn look_up_user_by_twitter_username<'a>( &'a self, body: &'a LookUpUserByTwitterUsernameBody, ) -> Result<ResponseValue<User>, Error<()>>

Lookup User by Twitter Username

Looks up a user by their Twitter username.

Sends a POST request to /v1/users/twitter/username

Source

pub async fn look_up_user_by_twitter_subject<'a>( &'a self, body: &'a LookUpUserByTwitterSubjectBody, ) -> Result<ResponseValue<User>, Error<()>>

Lookup User by Twitter Subject

Looks up a user by their Twitter subject.

Sends a POST request to /v1/users/twitter/subject

Source

pub async fn look_up_user_by_telegram_user_id<'a>( &'a self, body: &'a LookUpUserByTelegramUserIdBody, ) -> Result<ResponseValue<User>, Error<()>>

Lookup User by Telegram User ID

Looks up a user by their Telegram user ID.

Sends a POST request to /v1/users/telegram/telegram_user_id

Source

pub async fn look_up_user_by_telegram_username<'a>( &'a self, body: &'a LookUpUserByTelegramUsernameBody, ) -> Result<ResponseValue<User>, Error<()>>

Lookup User by Telegram Username

Looks up a user by their Telegram username.

Sends a POST request to /v1/users/telegram/username

Source

pub async fn search_users<'a>( &'a self, body: &'a SearchUsersBody, ) -> Result<ResponseValue<User>, Error<()>>

Search Users by Search Term

Search users by search term, emails, phone numbers, or wallet addresses.

Sends a POST request to /v1/users/search

Source

pub async fn create_user_wallet<'a>( &'a self, user_id: &'a str, body: &'a CreateUserWalletBody, ) -> Result<ResponseValue<User>, Error<()>>

Create Embedded Wallet

Creates an embedded wallet for an existing user.

Sends a POST request to /v1/users/{user_id}/wallets

Source

pub async fn add_or_update_user_linked_account<'a>( &'a self, user_id: &'a str, body: &'a LinkedAccountInput, ) -> Result<ResponseValue<User>, Error<()>>

Add or update a user linked account

Adds or updates a linked account for a user. This endpoint is not yet available to all users.

Sends a POST request to /v1/users/{user_id}/accounts

Unlink a user linked account

Unlinks a user linked account.

Sends a POST request to /v1/users/{user_id}/accounts/unlink

Source

pub async fn create_policy<'a>( &'a self, privy_idempotency_key: Option<&'a str>, body: &'a CreatePolicyBody, ) -> Result<ResponseValue<Policy>, Error<()>>

Create Policy

Create a new policy.

Sends a POST request to /v1/policies

Source

pub async fn get_policy<'a>( &'a self, policy_id: &'a GetPolicyPolicyId, ) -> Result<ResponseValue<Policy>, Error<()>>

Get Policy

Get a policy by policy ID.

Sends a GET request to /v1/policies/{policy_id}

Source

pub async fn delete_policy<'a>( &'a self, policy_id: &'a DeletePolicyPolicyId, privy_authorization_signature: Option<&'a str>, ) -> Result<ResponseValue<DeletePolicyResponse>, Error<()>>

Delete Policy

Delete a policy by policy ID.

Sends a DELETE request to /v1/policies/{policy_id}

Source

pub async fn update_policy<'a>( &'a self, policy_id: &'a UpdatePolicyPolicyId, privy_authorization_signature: Option<&'a str>, body: &'a UpdatePolicyBody, ) -> Result<ResponseValue<Policy>, Error<()>>

Update Policy

Update a policy by policy ID.

Sends a PATCH request to /v1/policies/{policy_id}

Source

pub async fn create_policy_rule<'a>( &'a self, policy_id: &'a CreatePolicyRulePolicyId, privy_authorization_signature: Option<&'a str>, body: &'a PolicyRuleRequestBody, ) -> Result<ResponseValue<PolicyRuleResponse>, Error<()>>

Create Policy Rule

Create a new rule for a policy.

Sends a POST request to /v1/policies/{policy_id}/rules

Source

pub async fn get_policy_rule<'a>( &'a self, policy_id: &'a GetPolicyRulePolicyId, rule_id: &'a GetPolicyRuleRuleId, ) -> Result<ResponseValue<PolicyRuleResponse>, Error<()>>

Get Policy Rule

Get a rule by policy ID and rule ID.

Sends a GET request to /v1/policies/{policy_id}/rules/{rule_id}

Source

pub async fn delete_policy_rule<'a>( &'a self, policy_id: &'a DeletePolicyRulePolicyId, rule_id: &'a DeletePolicyRuleRuleId, privy_authorization_signature: Option<&'a str>, ) -> Result<ResponseValue<DeletePolicyRuleResponse>, Error<()>>

Delete Policy Rule

Delete a rule by policy ID and rule ID.

Sends a DELETE request to /v1/policies/{policy_id}/rules/{rule_id}

Source

pub async fn update_policy_rule<'a>( &'a self, policy_id: &'a UpdatePolicyRulePolicyId, rule_id: &'a UpdatePolicyRuleRuleId, privy_authorization_signature: Option<&'a str>, body: &'a PolicyRuleRequestBody, ) -> Result<ResponseValue<UpdatePolicyRuleResponse>, Error<()>>

Update Policy Rule

Update a rule by policy ID and rule ID.

Sends a PATCH request to /v1/policies/{policy_id}/rules/{rule_id}

Source

pub async fn init_passkey_authentication<'a>( &'a self, body: &'a AuthPasskeyInitRequestBody, ) -> Result<ResponseValue<AuthPasskeyAuthenticationInitResponseBody>, Error<()>>

Initiate Passkey Authentication

Request a passkey authentication challenge.

Sends a POST request to /v1/user-accounts/passkeys/authenticate/init

Source

pub async fn authenticate_with_passkey<'a>( &'a self, body: &'a AuthPasskeyAuthenticationRequestBody, ) -> Result<ResponseValue<AuthenticatedUser>, Error<()>>

Authenticate With Passkey

Authenticate a user account with a passkey.

Sends a POST request to /v1/user-accounts/passkeys/authenticate

Source

pub async fn init_passkey_registration<'a>( &'a self, body: &'a AuthPasskeyInitRequestBody, ) -> Result<ResponseValue<AuthPasskeyRegistrationInitResponseBody>, Error<()>>

Initiate Passkey Registration

Request a passkey registration challenge

Sends a POST request to /v1/user-accounts/passkeys/register/init

Source

pub async fn register_with_passkey<'a>( &'a self, body: &'a AuthPasskeyRegistrationRequestBody, ) -> Result<ResponseValue<AuthenticatedUser>, Error<()>>

Register With Passkey

Register a new user account with a passkey.

Sends a POST request to /v1/user-accounts/passkeys/register

Initiate Passkey Link

Request a passkey registration challenge linked to a user account.

Sends a POST request to /v1/user-accounts/passkeys/link/init

Link Passkey

Link a passkey to an existing user account.

Sends a POST request to /v1/user-accounts/passkeys/link

Unlink Passkey

Unlink a passkey from a user account.

Sends a POST request to /v1/user-accounts/passkeys/unlink

Source

pub async fn send_code_to_email<'a>( &'a self, body: &'a SendCodeToEmailRequestBody, ) -> Result<ResponseValue<SendCodeToEmailResponseBody>, Error<()>>

Initiate Passwordless Authentication

Request a one time code to be sent to the user’s email.

Sends a POST request to /v1/user-accounts/passwordless/init

Source

pub async fn authenticate_with_email<'a>( &'a self, body: &'a AuthenticateWithEmailRequestBody, ) -> Result<ResponseValue<AuthenticatedUser>, Error<()>>

Authenticate With Passwordless

Authenticate a user account with an email and code.

Sends a POST request to /v1/user-accounts/passwordless/authenticate

Link Passwordless

Link an email to an existing user account.

Sends a POST request to /v1/user-accounts/passwordless/link

Unlink Passwordless

Unlink an email from a user account.

Sends a POST request to /v1/user-accounts/passwordless/unlink

Source

pub async fn update_email<'a>( &'a self, body: &'a UpdateEmailRequestBody, ) -> Result<ResponseValue<User>, Error<()>>

Update Passwordless

Update a user’s linked email account.

Sends a POST request to /v1/user-accounts/passwordless/update

Source

pub async fn get_transaction<'a>( &'a self, transaction_id: &'a str, ) -> Result<ResponseValue<Transaction>, Error<()>>

Get Transaction

Get a transaction by transaction ID.

Sends a GET request to /v1/transactions/{transaction_id}

Source

pub async fn get_key_quorum<'a>( &'a self, key_quorum_id: &'a str, ) -> Result<ResponseValue<KeyQuorum>, Error<()>>

Get key quorum

Get a key quorum by ID.

Sends a GET request to /v1/key_quorums/{key_quorum_id}

Source

pub async fn delete_key_quorum<'a>( &'a self, key_quorum_id: &'a str, privy_authorization_signature: Option<&'a str>, ) -> Result<ResponseValue<DeleteKeyQuorumResponse>, Error<()>>

Delete key quorum

Delete a key quorum by key quorum ID.

Sends a DELETE request to /v1/key_quorums/{key_quorum_id}

Source

pub async fn update_key_quorum<'a>( &'a self, key_quorum_id: &'a str, privy_authorization_signature: Option<&'a str>, body: &'a UpdateKeyQuorumBody, ) -> Result<ResponseValue<KeyQuorum>, Error<()>>

Update key quorum

Update a key quorum by key quorum ID.

Sends a PATCH request to /v1/key_quorums/{key_quorum_id}

Source

pub async fn create_key_quorum<'a>( &'a self, body: &'a CreateKeyQuorumBody, ) -> Result<ResponseValue<KeyQuorum>, Error<()>>

Create key quorum

Create a new key quorum.

Sends a POST request to /v1/key_quorums

Source

pub async fn user_fiat_statuses<'a>( &'a self, user_id: &'a str, body: &'a UserFiatStatusesBody, ) -> Result<ResponseValue<UserFiatStatusesResponse>, Error<()>>

Get a list of fiat transactions and their statuses

Returns a list of fiat transactions and their statuses

Sends a POST request to /v1/users/{user_id}/fiat/status

Source

pub async fn create_user_fiat_tos<'a>( &'a self, user_id: &'a str, body: &'a CreateUserFiatTosBody, ) -> Result<ResponseValue<CreateUserFiatTosResponse>, Error<()>>

Create a terms of service agreement for a user

Creates a terms of service agreement for a user

Sends a POST request to /v1/users/{user_id}/fiat/tos

Source

pub async fn get_user_fiat_kyc_status<'a>( &'a self, user_id: &'a str, provider: GetUserFiatKycStatusProvider, ) -> Result<ResponseValue<GetUserFiatKycStatusResponse>, Error<()>>

Get KYC status for a user

Get the current KYC verification status for a user from the configured provider

Sends a GET request to /v1/users/{user_id}/fiat/kyc

Source

pub async fn initiate_user_fiat_kyc<'a>( &'a self, user_id: &'a str, body: &'a InitiateUserFiatKycBody, ) -> Result<ResponseValue<InitiateUserFiatKycResponse>, Error<()>>

Initiate KYC verification for a user

Initiates KYC verification process for a user with the configured provider

Sends a POST request to /v1/users/{user_id}/fiat/kyc

Source

pub async fn update_user_fiat_kyc_status<'a>( &'a self, user_id: &'a str, body: &'a UpdateUserFiatKycStatusBody, ) -> Result<ResponseValue<UpdateUserFiatKycStatusResponse>, Error<()>>

Update KYC status for a user

Update the KYC verification status for a user from the configured provider

Sends a PATCH request to /v1/users/{user_id}/fiat/kyc

Get a KYC link for a user

Returns a KYC link for a user

Sends a POST request to /v1/users/{user_id}/fiat/kyc_link

Source

pub async fn get_user_fiat_accounts<'a>( &'a self, user_id: &'a str, provider: GetUserFiatAccountsProvider, ) -> Result<ResponseValue<GetUserFiatAccountsResponse>, Error<()>>

Get user’s fiat accounts

Returns the IDs of all external fiat accounts (used for offramping) for the user

Sends a GET request to /v1/users/{user_id}/fiat/accounts

Source

pub async fn create_user_fiat_account<'a>( &'a self, user_id: &'a str, body: &'a CreateUserFiatAccountBody, ) -> Result<ResponseValue<CreateUserFiatAccountResponse>, Error<()>>

Create a fiat account

Sets up external bank account object for the user through the configured default provider. Requires the user to already be KYC’ed.

Sends a POST request to /v1/users/{user_id}/fiat/accounts

Source

pub async fn initiate_user_fiat_offramp<'a>( &'a self, user_id: &'a str, body: &'a InitiateUserFiatOfframpBody, ) -> Result<ResponseValue<InitiateUserFiatOfframpResponse>, Error<()>>

Initiate an offramp transaction

Triggers the offramp flow and gets the on-chain address to send funds to

Sends a POST request to /v1/users/{user_id}/fiat/offramp

Source

pub async fn initiate_user_fiat_onramp<'a>( &'a self, user_id: &'a str, body: &'a InitiateUserFiatOnrampBody, ) -> Result<ResponseValue<InitiateUserFiatOnrampResponse>, Error<()>>

Initiate an onramp transaction

Triggers an onramp to the specified recipient blockchain address, returns the bank deposit instructions

Sends a POST request to /v1/users/{user_id}/fiat/onramp

Source

pub async fn configure_app_for_fiat_on_off_ramping<'a>( &'a self, app_id: &'a str, body: &'a ConfigureAppForFiatOnOffRampingBody, ) -> Result<ResponseValue<ConfigureAppForFiatOnOffRampingResponse>, Error<()>>

Configure app for fiat onramping and offramping

Updates the app configuration for the specified onramp provider. This is used to set up the app for fiat onramping and offramping.

Sends a POST request to /v1/apps/{app_id}/fiat

Trait Implementations§

Source§

impl ClientHooks for &Client

Source§

async fn pre<E>( &self, request: &mut Request, info: &OperationInfo, ) -> Result<(), Error<E>>

Runs prior to the execution of the request. This may be used to modify the request before it is transmitted.
Source§

async fn post<E>( &self, result: &Result<Response, Error>, info: &OperationInfo, ) -> Result<(), Error<E>>

Runs after completion of the request.
Source§

async fn exec( &self, request: Request, info: &OperationInfo, ) -> Result<Response, Error>

Execute the request. Note that for almost any reasonable implementation this will include code equivalent to this: Read more
Source§

impl ClientInfo<()> for Client

Source§

fn api_version() -> &'static str

Get the version of this API. Read more
Source§

fn baseurl(&self) -> &str

Get the base URL to which requests are made.
Source§

fn client(&self) -> &Client

Get the internal reqwest::Client used to make requests.
Source§

fn inner(&self) -> &()

Get the inner value of type T if one is specified.
Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

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 Debug for Client

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

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

Source§

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

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> 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, 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<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,