Skip to main content

SpotRestClient

Struct SpotRestClient 

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

The Kraken Spot REST API client.

This client provides access to all Kraken Spot trading REST endpoints. It handles authentication, rate limiting, and automatic retries.

§Example

use kraken_api_client::spot::rest::SpotRestClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create a client for public endpoints only
    let client = SpotRestClient::new();

    // Get server time
    let time = client.get_server_time().await?;
    println!("Server time: {:?}", time);

    Ok(())
}

For private endpoints, provide credentials:

use kraken_api_client::spot::rest::SpotRestClient;
use kraken_api_client::auth::StaticCredentials;
use std::sync::Arc;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let credentials = Arc::new(StaticCredentials::new("api_key", "api_secret"));
    let client = SpotRestClient::builder()
        .credentials(credentials)
        .build();

    let balance = client.get_account_balance().await?;
    println!("Balance: {:?}", balance);

    Ok(())
}

Implementations§

Source§

impl SpotRestClient

Source

pub fn new() -> Self

Create a new client with default settings.

This client can only access public endpoints. Use SpotRestClient::builder() to configure credentials for private endpoints.

Source

pub fn builder() -> SpotRestClientBuilder

Create a new client builder.

Source§

impl SpotRestClient

Source

pub async fn get_account_balance( &self, ) -> Result<HashMap<String, Decimal>, KrakenError>

Get account balance.

Returns the balances of all assets in the account.

§Example
use kraken_api_client::spot::rest::SpotRestClient;
use kraken_api_client::auth::StaticCredentials;
use std::sync::Arc;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let credentials = Arc::new(StaticCredentials::new("key", "secret"));
    let client = SpotRestClient::builder().credentials(credentials).build();

    let balances = client.get_account_balance().await?;
    for (asset, balance) in balances {
        println!("{}: {}", asset, balance);
    }
    Ok(())
}
Source

pub async fn get_extended_balance( &self, ) -> Result<ExtendedBalances, KrakenError>

Get extended balance with hold amounts.

Source

pub async fn get_trade_balance( &self, request: Option<&TradeBalanceRequest>, ) -> Result<TradeBalance, KrakenError>

Get trade balance.

Returns margin account details including equity, margin, and P&L.

Source

pub async fn get_open_orders( &self, request: Option<&OpenOrdersRequest>, ) -> Result<OpenOrders, KrakenError>

Get open orders.

Source

pub async fn get_closed_orders( &self, request: Option<&ClosedOrdersRequest>, ) -> Result<ClosedOrders, KrakenError>

Get closed orders.

Source

pub async fn query_orders( &self, request: &QueryOrdersRequest, ) -> Result<HashMap<String, Order>, KrakenError>

Query specific orders by ID.

Source

pub async fn get_trades_history( &self, request: Option<&TradesHistoryRequest>, ) -> Result<TradesHistory, KrakenError>

Get trades history.

Source

pub async fn get_open_positions( &self, request: Option<&OpenPositionsRequest>, ) -> Result<HashMap<String, Position>, KrakenError>

Get open positions.

Source

pub async fn get_ledgers( &self, request: Option<&LedgersRequest>, ) -> Result<LedgersInfo, KrakenError>

Get ledger entries.

Source

pub async fn get_trade_volume( &self, request: Option<&TradeVolumeRequest>, ) -> Result<TradeVolume, KrakenError>

Get trade volume and fee info.

Source

pub async fn get_deposit_methods( &self, request: &DepositMethodsRequest, ) -> Result<Vec<DepositMethod>, KrakenError>

Get available deposit methods for an asset.

Source

pub async fn get_deposit_addresses( &self, request: &DepositAddressesRequest, ) -> Result<Vec<DepositAddress>, KrakenError>

Get deposit addresses for an asset and method.

Source

pub async fn get_deposit_status( &self, request: Option<&DepositStatusRequest>, ) -> Result<DepositWithdrawStatusResponse, KrakenError>

Get deposit status.

Source

pub async fn get_withdraw_methods( &self, request: Option<&WithdrawMethodsRequest>, ) -> Result<Vec<WithdrawMethod>, KrakenError>

Get available withdrawal methods.

Source

pub async fn get_withdraw_addresses( &self, request: Option<&WithdrawAddressesRequest>, ) -> Result<Vec<WithdrawalAddress>, KrakenError>

Get withdrawal addresses.

Source

pub async fn get_withdraw_info( &self, request: &WithdrawInfoRequest, ) -> Result<WithdrawInfo, KrakenError>

Get withdrawal info (limits and fees).

Source

pub async fn withdraw_funds( &self, request: &WithdrawRequest, ) -> Result<ConfirmationRefId, KrakenError>

Withdraw funds.

Source

pub async fn get_withdraw_status( &self, request: Option<&WithdrawStatusRequest>, ) -> Result<DepositWithdrawStatusResponse, KrakenError>

Get withdrawal status.

Source

pub async fn withdraw_cancel( &self, request: &WithdrawCancelRequest, ) -> Result<bool, KrakenError>

Cancel a withdrawal.

Source

pub async fn wallet_transfer( &self, request: &WalletTransferRequest, ) -> Result<ConfirmationRefId, KrakenError>

Transfer funds between wallets (e.g., Spot to Futures).

Source

pub async fn earn_allocate( &self, request: &EarnAllocateRequest, ) -> Result<bool, KrakenError>

Allocate funds to an earn strategy.

Source

pub async fn earn_deallocate( &self, request: &EarnAllocateRequest, ) -> Result<bool, KrakenError>

Deallocate funds from an earn strategy.

Source

pub async fn get_earn_allocation_status( &self, request: &EarnAllocationStatusRequest, ) -> Result<AllocationStatus, KrakenError>

Get earn allocation status.

Source

pub async fn get_earn_deallocation_status( &self, request: &EarnAllocationStatusRequest, ) -> Result<AllocationStatus, KrakenError>

Get earn deallocation status.

Source

pub async fn list_earn_strategies( &self, request: Option<&EarnStrategiesRequest>, ) -> Result<EarnStrategies, KrakenError>

List earn strategies.

Source

pub async fn list_earn_allocations( &self, request: Option<&EarnAllocationsRequest>, ) -> Result<EarnAllocations, KrakenError>

List earn allocations.

Source

pub async fn add_order( &self, request: &AddOrderRequest, ) -> Result<AddOrderResponse, KrakenError>

Add a new order.

§Example
use kraken_api_client::spot::rest::{SpotRestClient, private::AddOrderRequest};
use kraken_api_client::{BuySell, OrderType};
use kraken_api_client::auth::StaticCredentials;
use rust_decimal::Decimal;
use std::str::FromStr;
use std::sync::Arc;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let credentials = Arc::new(StaticCredentials::new("key", "secret"));
    let client = SpotRestClient::builder().credentials(credentials).build();

    let request = AddOrderRequest::new(
        "XBTUSD",
        BuySell::Buy,
        OrderType::Limit,
        Decimal::from_str("0.001")?,
    )
    .price(Decimal::from_str("50000")?)
    .validate(true); // Validate only, don't actually place

    let result = client.add_order(&request).await?;
    println!("Order result: {:?}", result);
    Ok(())
}
Source

pub async fn cancel_order( &self, request: &CancelOrderRequest, ) -> Result<CancelOrderResponse, KrakenError>

Cancel an order.

Source

pub async fn cancel_all_orders( &self, ) -> Result<CancelOrderResponse, KrakenError>

Cancel all open orders.

Source

pub async fn get_websocket_token(&self) -> Result<WebSocketToken, KrakenError>

Get a WebSocket authentication token.

The token is valid for 15 minutes and is used to authenticate WebSocket connections to private channels.

Source§

impl SpotRestClient

Source

pub async fn get_server_time(&self) -> Result<ServerTime, KrakenError>

Get the server time.

This is useful for synchronizing local time and checking API availability.

§Example
use kraken_api_client::spot::rest::SpotRestClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = SpotRestClient::new();
    let time = client.get_server_time().await?;
    println!("Server time: {} ({})", time.unixtime, time.rfc1123);
    Ok(())
}
Source

pub async fn get_system_status(&self) -> Result<SystemStatus, KrakenError>

Get the system status.

Returns the current system status and timestamp.

Source

pub async fn get_assets( &self, request: Option<&AssetInfoRequest>, ) -> Result<HashMap<String, AssetInfo>, KrakenError>

Get asset information.

Returns information about the assets available on Kraken.

§Arguments
  • request - Optional request parameters to filter assets.
Source

pub async fn get_asset_pairs( &self, request: Option<&AssetPairsRequest>, ) -> Result<HashMap<String, AssetPair>, KrakenError>

Get tradable asset pairs.

Returns information about the trading pairs available on Kraken.

§Arguments
  • request - Optional request parameters to filter pairs.
Source

pub async fn get_ticker( &self, pairs: &str, ) -> Result<HashMap<String, TickerInfo>, KrakenError>

Get ticker information for one or more pairs.

§Arguments
  • pairs - Comma-separated list of pairs (e.g., “XBTUSD,ETHUSD”).
Source

pub async fn get_ohlc( &self, request: &OhlcRequest, ) -> Result<OhlcResponse, KrakenError>

Get OHLC (candlestick) data.

Returns up to 720 OHLC data points for the specified pair and interval.

§Arguments
  • request - OHLC request parameters.
Source

pub async fn get_order_book( &self, request: &OrderBookRequest, ) -> Result<HashMap<String, OrderBook>, KrakenError>

Get order book for a pair.

§Arguments
  • request - Order book request parameters.
Source

pub async fn get_recent_trades( &self, request: &RecentTradesRequest, ) -> Result<RecentTradesResponse, KrakenError>

Get recent trades for a pair.

§Arguments
  • request - Recent trades request parameters.
Source

pub async fn get_recent_spreads( &self, request: &RecentSpreadsRequest, ) -> Result<RecentSpreadsResponse, KrakenError>

Get recent spreads for a pair.

§Arguments
  • request - Recent spreads request parameters.

Trait Implementations§

Source§

impl Clone for SpotRestClient

Source§

fn clone(&self) -> SpotRestClient

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 SpotRestClient

Source§

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

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

impl Default for SpotRestClient

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl KrakenClient for SpotRestClient

Source§

async fn get_server_time(&self) -> Result<ServerTime, KrakenError>

Get the server time.
Source§

async fn get_system_status(&self) -> Result<SystemStatus, KrakenError>

Get the system status.
Source§

async fn get_assets( &self, request: Option<&AssetInfoRequest>, ) -> Result<HashMap<String, AssetInfo>, KrakenError>

Get asset information.
Source§

async fn get_asset_pairs( &self, request: Option<&AssetPairsRequest>, ) -> Result<HashMap<String, AssetPair>, KrakenError>

Get tradable asset pairs.
Source§

async fn get_ticker( &self, pairs: &str, ) -> Result<HashMap<String, TickerInfo>, KrakenError>

Get ticker information for one or more pairs.
Source§

async fn get_ohlc( &self, request: &OhlcRequest, ) -> Result<OhlcResponse, KrakenError>

Get OHLC (candlestick) data.
Source§

async fn get_order_book( &self, request: &OrderBookRequest, ) -> Result<HashMap<String, OrderBook>, KrakenError>

Get order book for a pair.
Source§

async fn get_recent_trades( &self, request: &RecentTradesRequest, ) -> Result<RecentTradesResponse, KrakenError>

Get recent trades for a pair.
Source§

async fn get_recent_spreads( &self, request: &RecentSpreadsRequest, ) -> Result<RecentSpreadsResponse, KrakenError>

Get recent spreads for a pair.
Source§

async fn get_account_balance( &self, ) -> Result<HashMap<String, Decimal>, KrakenError>

Get account balance.
Source§

async fn get_extended_balance(&self) -> Result<ExtendedBalances, KrakenError>

Get extended balance with hold amounts.
Source§

async fn get_trade_balance( &self, request: Option<&TradeBalanceRequest>, ) -> Result<TradeBalance, KrakenError>

Get trade balance (margin account details).
Source§

async fn get_open_orders( &self, request: Option<&OpenOrdersRequest>, ) -> Result<OpenOrders, KrakenError>

Get open orders.
Source§

async fn get_closed_orders( &self, request: Option<&ClosedOrdersRequest>, ) -> Result<ClosedOrders, KrakenError>

Get closed orders.
Source§

async fn query_orders( &self, request: &QueryOrdersRequest, ) -> Result<HashMap<String, Order>, KrakenError>

Query specific orders by ID.
Source§

async fn get_trades_history( &self, request: Option<&TradesHistoryRequest>, ) -> Result<TradesHistory, KrakenError>

Get trades history.
Source§

async fn get_open_positions( &self, request: Option<&OpenPositionsRequest>, ) -> Result<HashMap<String, Position>, KrakenError>

Get open positions.
Source§

async fn get_ledgers( &self, request: Option<&LedgersRequest>, ) -> Result<LedgersInfo, KrakenError>

Get ledger entries.
Source§

async fn get_trade_volume( &self, request: Option<&TradeVolumeRequest>, ) -> Result<TradeVolume, KrakenError>

Get trade volume and fee info.
Source§

async fn get_deposit_methods( &self, request: &DepositMethodsRequest, ) -> Result<Vec<DepositMethod>, KrakenError>

Get available deposit methods.
Source§

async fn get_deposit_addresses( &self, request: &DepositAddressesRequest, ) -> Result<Vec<DepositAddress>, KrakenError>

Get deposit addresses.
Source§

async fn get_deposit_status( &self, request: Option<&DepositStatusRequest>, ) -> Result<DepositWithdrawStatusResponse, KrakenError>

Get deposit status.
Source§

async fn get_withdraw_methods( &self, request: Option<&WithdrawMethodsRequest>, ) -> Result<Vec<WithdrawMethod>, KrakenError>

Get available withdrawal methods.
Source§

async fn get_withdraw_addresses( &self, request: Option<&WithdrawAddressesRequest>, ) -> Result<Vec<WithdrawalAddress>, KrakenError>

Get withdrawal addresses.
Source§

async fn get_withdraw_info( &self, request: &WithdrawInfoRequest, ) -> Result<WithdrawInfo, KrakenError>

Get withdrawal info.
Source§

async fn withdraw_funds( &self, request: &WithdrawRequest, ) -> Result<ConfirmationRefId, KrakenError>

Withdraw funds.
Source§

async fn get_withdraw_status( &self, request: Option<&WithdrawStatusRequest>, ) -> Result<DepositWithdrawStatusResponse, KrakenError>

Get withdrawal status.
Source§

async fn withdraw_cancel( &self, request: &WithdrawCancelRequest, ) -> Result<bool, KrakenError>

Cancel a withdrawal.
Source§

async fn wallet_transfer( &self, request: &WalletTransferRequest, ) -> Result<ConfirmationRefId, KrakenError>

Transfer funds between wallets.
Source§

async fn earn_allocate( &self, request: &EarnAllocateRequest, ) -> Result<bool, KrakenError>

Allocate funds to an earn strategy.
Source§

async fn earn_deallocate( &self, request: &EarnAllocateRequest, ) -> Result<bool, KrakenError>

Deallocate funds from an earn strategy.
Source§

async fn get_earn_allocation_status( &self, request: &EarnAllocationStatusRequest, ) -> Result<AllocationStatus, KrakenError>

Get earn allocation status.
Source§

async fn get_earn_deallocation_status( &self, request: &EarnAllocationStatusRequest, ) -> Result<AllocationStatus, KrakenError>

Get earn deallocation status.
Source§

async fn list_earn_strategies( &self, request: Option<&EarnStrategiesRequest>, ) -> Result<EarnStrategies, KrakenError>

List earn strategies.
Source§

async fn list_earn_allocations( &self, request: Option<&EarnAllocationsRequest>, ) -> Result<EarnAllocations, KrakenError>

List earn allocations.
Source§

async fn add_order( &self, request: &AddOrderRequest, ) -> Result<AddOrderResponse, KrakenError>

Add a new order.
Source§

async fn cancel_order( &self, request: &CancelOrderRequest, ) -> Result<CancelOrderResponse, KrakenError>

Cancel an order.
Source§

async fn cancel_all_orders(&self) -> Result<CancelOrderResponse, KrakenError>

Cancel all open orders.
Source§

async fn get_websocket_token(&self) -> Result<WebSocketToken, KrakenError>

Get a WebSocket authentication token.

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
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> KrakenClientExt for T
where T: KrakenClient,

Source§

async fn get_server_time(&self) -> Result<ServerTime, KrakenError>

Source§

async fn get_system_status(&self) -> Result<SystemStatus, KrakenError>

Source§

async fn get_assets( &self, request: Option<&AssetInfoRequest>, ) -> Result<HashMap<String, AssetInfo>, KrakenError>

Source§

async fn get_asset_pairs( &self, request: Option<&AssetPairsRequest>, ) -> Result<HashMap<String, AssetPair>, KrakenError>

Source§

async fn get_ticker( &self, pairs: &str, ) -> Result<HashMap<String, TickerInfo>, KrakenError>

Source§

async fn get_ohlc( &self, request: &OhlcRequest, ) -> Result<OhlcResponse, KrakenError>

Source§

async fn get_order_book( &self, request: &OrderBookRequest, ) -> Result<HashMap<String, OrderBook>, KrakenError>

Source§

async fn get_recent_trades( &self, request: &RecentTradesRequest, ) -> Result<RecentTradesResponse, KrakenError>

Source§

async fn get_recent_spreads( &self, request: &RecentSpreadsRequest, ) -> Result<RecentSpreadsResponse, KrakenError>

Source§

async fn get_account_balance( &self, ) -> Result<HashMap<String, Decimal>, KrakenError>

Source§

async fn get_extended_balance(&self) -> Result<ExtendedBalances, KrakenError>

Source§

async fn get_trade_balance( &self, request: Option<&TradeBalanceRequest>, ) -> Result<TradeBalance, KrakenError>

Source§

async fn get_open_orders( &self, request: Option<&OpenOrdersRequest>, ) -> Result<OpenOrders, KrakenError>

Source§

async fn get_closed_orders( &self, request: Option<&ClosedOrdersRequest>, ) -> Result<ClosedOrders, KrakenError>

Source§

async fn query_orders( &self, request: &QueryOrdersRequest, ) -> Result<HashMap<String, Order>, KrakenError>

Source§

async fn get_trades_history( &self, request: Option<&TradesHistoryRequest>, ) -> Result<TradesHistory, KrakenError>

Source§

async fn get_open_positions( &self, request: Option<&OpenPositionsRequest>, ) -> Result<HashMap<String, Position>, KrakenError>

Source§

async fn get_ledgers( &self, request: Option<&LedgersRequest>, ) -> Result<LedgersInfo, KrakenError>

Source§

async fn get_trade_volume( &self, request: Option<&TradeVolumeRequest>, ) -> Result<TradeVolume, KrakenError>

Source§

async fn get_deposit_methods( &self, request: &DepositMethodsRequest, ) -> Result<Vec<DepositMethod>, KrakenError>

Source§

async fn get_deposit_addresses( &self, request: &DepositAddressesRequest, ) -> Result<Vec<DepositAddress>, KrakenError>

Source§

async fn get_deposit_status( &self, request: Option<&TransferStatusRequest>, ) -> Result<DepositWithdrawStatusResponse, KrakenError>

Source§

async fn get_withdraw_methods( &self, request: Option<&WithdrawMethodsRequest>, ) -> Result<Vec<WithdrawMethod>, KrakenError>

Source§

async fn get_withdraw_addresses( &self, request: Option<&WithdrawAddressesRequest>, ) -> Result<Vec<WithdrawalAddress>, KrakenError>

Source§

async fn get_withdraw_info( &self, request: &WithdrawInfoRequest, ) -> Result<WithdrawInfo, KrakenError>

Source§

async fn withdraw_funds( &self, request: &WithdrawRequest, ) -> Result<ConfirmationRefId, KrakenError>

Source§

async fn get_withdraw_status( &self, request: Option<&TransferStatusRequest>, ) -> Result<DepositWithdrawStatusResponse, KrakenError>

Source§

async fn withdraw_cancel( &self, request: &WithdrawCancelRequest, ) -> Result<bool, KrakenError>

Source§

async fn wallet_transfer( &self, request: &WalletTransferRequest, ) -> Result<ConfirmationRefId, KrakenError>

Source§

async fn earn_allocate( &self, request: &EarnAllocateRequest, ) -> Result<bool, KrakenError>

Source§

async fn earn_deallocate( &self, request: &EarnAllocateRequest, ) -> Result<bool, KrakenError>

Source§

async fn get_earn_allocation_status( &self, request: &EarnAllocationStatusRequest, ) -> Result<AllocationStatus, KrakenError>

Source§

async fn get_earn_deallocation_status( &self, request: &EarnAllocationStatusRequest, ) -> Result<AllocationStatus, KrakenError>

Source§

async fn list_earn_strategies( &self, request: Option<&EarnStrategiesRequest>, ) -> Result<EarnStrategies, KrakenError>

Source§

async fn list_earn_allocations( &self, request: Option<&EarnAllocationsRequest>, ) -> Result<EarnAllocations, KrakenError>

Source§

async fn add_order( &self, request: &AddOrderRequest, ) -> Result<AddOrderResponse, KrakenError>

Source§

async fn cancel_order( &self, request: &CancelOrderRequest, ) -> Result<CancelOrderResponse, KrakenError>

Source§

async fn cancel_all_orders(&self) -> Result<CancelOrderResponse, KrakenError>

Source§

async fn get_websocket_token(&self) -> Result<WebSocketToken, KrakenError>

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