Skip to main content

SupabaseWalletDatabase

Struct SupabaseWalletDatabase 

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

Supabase wallet database implementation

This database uses two types of authentication:

  • api_key: The Supabase project API key (required, used in apikey header)
  • jwt_token: An optional JWT token for user authentication (used in Authorization: Bearer header)

When jwt_token is set, requests will include both headers:

  • apikey: <api_key>
  • Authorization: Bearer <jwt_token>

When jwt_token is not set, the api_key is used for both headers (legacy behavior).

§Authentication Providers

The database supports multiple authentication providers via AuthProvider:

  • None: No automatic token refresh, use API key only
  • SupabaseAuth: Uses Supabase’s GoTrue API for token refresh
  • Oidc: Uses an external OIDC provider for token refresh

Implementations§

Source§

impl SupabaseWalletDatabase

Source

pub const REQUIRED_SCHEMA_VERSION: u32 = 7

The schema version required by this SDK version.

This must match the latest schema_version value set in the migration files. When adding new migrations, update this constant and set the same value in the new migration’s INSERT INTO schema_info statement.

Source

pub async fn new(url: Url, api_key: String) -> Result<Self, Error>

Create a new SupabaseWalletDatabase with API key only (legacy behavior)

No automatic token refresh is configured.

Note: This does NOT run or check migrations automatically. After authentication, call [check_schema_compatibility()] to verify the database schema is ready. Migrations must be run separately by an administrator — see [get_schema_sql()] or use supabase db push.

Source

pub async fn with_supabase_auth( url: Url, api_key: String, ) -> Result<Self, Error>

Create a new SupabaseWalletDatabase with Supabase Auth for token refresh

This uses Supabase’s built-in GoTrue authentication system. Token refresh uses POST /auth/v1/token with grant_type=refresh_token.

Note: This does NOT run or check migrations automatically. After authentication, call [check_schema_compatibility()] to verify the database schema is ready. Migrations must be run separately by an administrator — see [get_schema_sql()] or use supabase db push.

Source

pub async fn with_oidc( url: Url, api_key: String, oidc_client: OidcClient, ) -> Result<Self, Error>

Create a new SupabaseWalletDatabase with external OIDC client for auth

This uses an external OIDC provider (e.g., Keycloak, Auth0) for token refresh. The OIDC provider must be configured in Supabase to validate the JWTs.

Note: This does NOT run or check migrations automatically. After authentication, call [check_schema_compatibility()] to verify the database schema is ready. Migrations must be run separately by an administrator — see [get_schema_sql()] or use supabase db push.

Source

pub fn get_schema_sql() -> String

Get the full database schema SQL

Returns the concatenated SQL of all migration files.

Use this to set up or update the database schema by running the output through the Supabase Dashboard SQL editor or supabase db push. This is an admin-only operation — never run this from a client app.

Source

pub async fn check_schema_compatibility(&self) -> Result<(), Error>

Check that the database schema is compatible with this SDK version

This is the recommended client-side startup check. It queries the schema_info table (which is readable by all authenticated users) to verify the database has the required schema version.

§Errors
§Example
// Call after authentication, before using the database
db.check_schema_compatibility().await?;
// Database is ready for use
Source

pub async fn set_jwt_token(&self, token: Option<String>)

Set or update the JWT token for authentication

Source

pub async fn set_refresh_token(&self, token: Option<String>)

Set refresh token

Source

pub async fn set_encryption_password(&self, password: &str) -> Result<(), Error>

Derives an AES-256-GCM encryption key from password via scrypt.

Source

pub async fn refresh_access_token(&self) -> Result<(), Error>

Refresh the access token using the stored refresh token

This method handles different authentication providers:

  • SupabaseAuth: Uses POST /auth/v1/token with grant_type=refresh_token
  • Oidc: Uses the OIDC provider’s token endpoint
  • None: Returns an error (no provider configured)
Source

pub async fn signup( &self, email: &str, password: &str, ) -> Result<SupabaseAuthResponse, Error>

Sign up a new user and automatically set tokens if returned

Source

pub async fn signin( &self, email: &str, password: &str, ) -> Result<SupabaseAuthResponse, Error>

Sign in a user and automatically set tokens on the database instance

Source

pub async fn get_jwt_token(&self) -> Option<String>

Get the current JWT token if set

Source

pub async fn call_rpc( &self, function_name: &str, params_json: &str, ) -> Result<String, Error>

Call a Supabase RPC function with JSON parameters

Source

pub fn join_url(&self, path: &str) -> Result<Url, DatabaseError>

Join the base URL with a path

Trait Implementations§

Source§

impl Clone for SupabaseWalletDatabase

Source§

fn clone(&self) -> SupabaseWalletDatabase

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Database<Error> for SupabaseWalletDatabase

Source§

fn get_mint<'life0, 'async_trait>( &'life0 self, mint_url: MintUrl, ) -> Pin<Box<dyn Future<Output = Result<Option<MintInfo>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get mint from storage
Source§

fn get_mints<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HashMap<MintUrl, Option<MintInfo>>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get all mints from storage
Source§

fn get_mint_keysets<'life0, 'async_trait>( &'life0 self, mint_url: MintUrl, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<KeySetInfo>>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get mint keysets for mint url
Source§

fn get_keyset_by_id<'life0, 'life1, 'async_trait>( &'life0 self, keyset_id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = Result<Option<KeySetInfo>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get mint keyset by id
Source§

fn get_mint_quote<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<MintQuote>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get mint quote from storage
Source§

fn get_mint_quotes<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<MintQuote>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get mint quotes from storage
Source§

fn get_unissued_mint_quotes<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<MintQuote>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get unissued mint quotes from storage Returns bolt11 quotes where nothing has been issued yet (amount_issued = 0) and all bolt12 quotes. Includes unpaid bolt11 quotes to allow checking with the mint if they’ve been paid (wallet state may be outdated).
Source§

fn get_melt_quote<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<MeltQuote>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get melt quote from storage
Source§

fn get_melt_quotes<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<MeltQuote>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get melt quotes from storage
Source§

fn get_keys<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = Result<Option<Keys>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get Keys from storage
Source§

fn get_proofs<'life0, 'async_trait>( &'life0 self, mint_url: Option<MintUrl>, unit: Option<CurrencyUnit>, state: Option<Vec<State>>, spending_conditions: Option<Vec<SpendingConditions>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ProofInfo>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get proofs from storage
Source§

fn get_proofs_by_ys<'life0, 'async_trait>( &'life0 self, ys: Vec<PublicKey>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ProofInfo>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get proofs by Y values
Source§

fn get_balance<'life0, 'async_trait>( &'life0 self, mint_url: Option<MintUrl>, unit: Option<CurrencyUnit>, state: Option<Vec<State>>, ) -> Pin<Box<dyn Future<Output = Result<u64, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get balance
Source§

fn get_transaction<'life0, 'async_trait>( &'life0 self, transaction_id: TransactionId, ) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get transaction from storage
Source§

fn list_transactions<'life0, 'async_trait>( &'life0 self, mint_url: Option<MintUrl>, direction: Option<TransactionDirection>, unit: Option<CurrencyUnit>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Transaction>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List transactions from storage
Source§

fn update_proofs<'life0, 'async_trait>( &'life0 self, added: Vec<ProofInfo>, removed_ys: Vec<PublicKey>, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update the proofs in storage by adding new proofs or removing proofs by their Y value
Source§

fn update_proofs_state<'life0, 'async_trait>( &'life0 self, ys: Vec<PublicKey>, state: State, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update proofs state in storage
Source§

fn add_transaction<'life0, 'async_trait>( &'life0 self, transaction: Transaction, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add transaction to storage
Source§

fn remove_transaction<'life0, 'async_trait>( &'life0 self, transaction_id: TransactionId, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Remove transaction from storage
Source§

fn update_mint_url<'life0, 'async_trait>( &'life0 self, old_mint_url: MintUrl, new_mint_url: MintUrl, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update mint url
Source§

fn increment_keyset_counter<'life0, 'life1, 'async_trait>( &'life0 self, keyset_id: &'life1 Id, count: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically increment Keyset counter and return new value
Source§

fn add_mint<'life0, 'async_trait>( &'life0 self, mint_url: MintUrl, mint_info: Option<MintInfo>, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add Mint to storage
Source§

fn remove_mint<'life0, 'async_trait>( &'life0 self, mint_url: MintUrl, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Remove Mint from storage
Source§

fn add_mint_keysets<'life0, 'async_trait>( &'life0 self, mint_url: MintUrl, keysets: Vec<KeySetInfo>, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add mint keyset to storage
Source§

fn add_mint_quote<'life0, 'async_trait>( &'life0 self, quote: MintQuote, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add mint quote to storage
Source§

fn remove_mint_quote<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove mint quote from storage
Source§

fn add_melt_quote<'life0, 'async_trait>( &'life0 self, quote: MeltQuote, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add melt quote to storage
Source§

fn remove_melt_quote<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove melt quote from storage
Source§

fn add_keys<'life0, 'async_trait>( &'life0 self, keyset: KeySet, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add Keys to storage
Source§

fn remove_keys<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove Keys from storage
Source§

fn kv_write<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, primary_namespace: &'life1 str, secondary_namespace: &'life2 str, key: &'life3 str, value: &'life4 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Write a value to the key-value store
Source§

fn kv_remove<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, primary_namespace: &'life1 str, secondary_namespace: &'life2 str, key: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Remove a value from the key-value store
Source§

fn kv_read<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, primary_namespace: &'life1 str, secondary_namespace: &'life2 str, key: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Read a value from the key-value store
Source§

fn kv_list<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, primary_namespace: &'life1 str, secondary_namespace: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List keys in a namespace
Source§

fn add_saga<'life0, 'async_trait>( &'life0 self, saga: WalletSaga, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add a wallet saga to storage. Read more
Source§

fn get_saga<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<WalletSaga>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a wallet saga by ID.
Source§

fn update_saga<'life0, 'async_trait>( &'life0 self, saga: WalletSaga, ) -> Pin<Box<dyn Future<Output = Result<bool, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update a wallet saga with optimistic locking. Read more
Source§

fn delete_saga<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete a wallet saga.
Source§

fn get_incomplete_sagas<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<WalletSaga>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get all incomplete sagas.
Source§

fn reserve_proofs<'life0, 'life1, 'async_trait>( &'life0 self, ys: Vec<PublicKey>, operation_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reserve proofs for an operation
Source§

fn release_proofs<'life0, 'life1, 'async_trait>( &'life0 self, operation_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Release proofs reserved by an operation
Source§

fn get_reserved_proofs<'life0, 'life1, 'async_trait>( &'life0 self, operation_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<ProofInfo>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get proofs reserved by an operation
Source§

fn reserve_melt_quote<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, quote_id: &'life1 str, operation_id: &'life2 Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Reserve a melt quote for an operation.
Source§

fn release_melt_quote<'life0, 'life1, 'async_trait>( &'life0 self, operation_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Release a melt quote reserved by an operation.
Source§

fn reserve_mint_quote<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, quote_id: &'life1 str, operation_id: &'life2 Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Reserve a mint quote for an operation.
Source§

fn release_mint_quote<'life0, 'life1, 'async_trait>( &'life0 self, operation_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Release a mint quote reserved by an operation.
Source§

fn add_p2pk_key<'life0, 'life1, 'async_trait>( &'life0 self, pubkey: &'life1 PublicKey, derivation_path: DerivationPath, derivation_index: u32, ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Store a P2PK signing key for the wallet
Source§

fn get_p2pk_key<'life0, 'life1, 'async_trait>( &'life0 self, pubkey: &'life1 PublicKey, ) -> Pin<Box<dyn Future<Output = Result<Option<P2PKSigningKey>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a stored P2PK signing key by pubkey.
Source§

fn list_p2pk_keys<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<P2PKSigningKey>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all stored P2PK signing keys.
Source§

fn latest_p2pk<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<P2PKSigningKey>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Tries to get the latest p2pk key generated
Source§

impl Debug for SupabaseWalletDatabase

Source§

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

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

impl KVStoreDatabase for SupabaseWalletDatabase

Source§

type Err = Error

KV Store Database Error
Source§

fn kv_read<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, primary_namespace: &'life1 str, secondary_namespace: &'life2 str, key: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Read value from key-value store
Source§

fn kv_list<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, primary_namespace: &'life1 str, secondary_namespace: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List keys in a namespace

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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: Sized + 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: Sized + 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<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