Skip to main content

DeribitWebSocketClient

Struct DeribitWebSocketClient 

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

WebSocket client for connecting to Deribit.

Implementations§

Source§

impl DeribitWebSocketClient

Source

pub fn new( url: Option<String>, api_key: Option<String>, api_secret: Option<String>, heartbeat_interval: Option<u64>, is_testnet: bool, ) -> Result<Self>

Creates a new DeribitWebSocketClient instance.

Falls back to environment variables if credentials are not provided.

§Errors

Returns an error if only one of api_key or api_secret is provided.

Source

pub fn new_public(is_testnet: bool) -> Result<Self>

Creates a new public (unauthenticated) client.

Does NOT fall back to environment variables for credentials.

§Errors

Returns an error if initialization fails.

Source

pub fn new_unauthenticated( url: Option<String>, heartbeat_interval: Option<u64>, is_testnet: bool, ) -> Result<Self>

Creates an unauthenticated client with a custom URL.

Does NOT fall back to environment variables for credentials. Useful for testing against mock servers.

§Errors

Returns an error if initialization fails.

Source

pub fn with_credentials(is_testnet: bool) -> Result<Self>

Creates an authenticated client with credentials.

Uses environment variables to load credentials:

  • Testnet: DERIBIT_TESTNET_API_KEY and DERIBIT_TESTNET_API_SECRET
  • Mainnet: DERIBIT_API_KEY and DERIBIT_API_SECRET
§Errors

Returns an error if credentials are not found in environment variables.

Source

pub fn is_active(&self) -> bool

Returns whether the client is actively connected.

Source

pub fn url(&self) -> &str

Returns the WebSocket URL.

Source

pub fn is_closed(&self) -> bool

Returns whether the client is closed.

Source

pub fn cancel_all_requests(&self)

Cancel all pending WebSocket requests.

Source

pub fn cancellation_token(&self) -> &CancellationToken

Returns the cancellation token for this client.

Source

pub async fn wait_until_active(&self, timeout_secs: f64) -> DeribitWsResult<()>

Waits until the client is active or timeout expires.

§Errors

Returns an error if the timeout expires before the client becomes active.

Source

pub fn cache_instruments(&self, instruments: Vec<InstrumentAny>)

Caches instruments for use during message parsing.

Source

pub fn cache_instrument(&self, instrument: InstrumentAny)

Caches a single instrument.

Source

pub async fn connect(&mut self) -> Result<()>

Connects to the Deribit WebSocket API.

§Errors

Returns an error if the connection fails.

Source

pub async fn close(&self) -> DeribitWsResult<()>

Closes the WebSocket connection.

§Errors

Returns an error if the close operation fails.

Source

pub fn stream(&mut self) -> impl Stream<Item = NautilusWsMessage> + 'static

Returns a stream of WebSocket messages.

§Panics

Panics if called before connect() or if called twice.

Source

pub fn has_credentials(&self) -> bool

Returns whether the client has credentials configured.

Source

pub fn is_authenticated(&self) -> bool

Returns whether the client is authenticated.

Source

pub async fn authenticate( &self, session_name: Option<&str>, ) -> DeribitWsResult<()>

Authenticates the WebSocket session with Deribit.

Uses the client_signature grant type with HMAC-SHA256 signature. This must be called before subscribing to raw data streams.

§Arguments
  • session_name - Optional session name for session-scoped authentication. When provided, uses session:<name> scope which allows skipping access_token in subsequent private requests. When None, uses default connection scope. Recommended to use session scope for order execution compatibility.
§Errors

Returns an error if:

  • No credentials are configured
  • The authentication request fails
  • The authentication times out
Source

pub async fn authenticate_session( &self, session_name: &str, ) -> DeribitWsResult<()>

Authenticates with session scope using the provided session name.

Use DERIBIT_DATA_SESSION_NAME for data clients and DERIBIT_EXECUTION_SESSION_NAME for execution clients.

§Errors

Returns an error if authentication fails.

Source

pub async fn auth_state(&self) -> Option<AuthState>

Returns the current authentication state containing tokens.

Returns None if not authenticated or tokens haven’t been stored yet.

Source

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

Returns the current access token if available.

Source

pub fn set_account_id(&mut self, account_id: AccountId)

Sets the account ID for order/fill reports.

Source

pub fn set_bars_timestamp_on_close(&mut self, value: bool)

Sets whether bar timestamps should use the close time.

When true (default), bar ts_event is set to the bar’s close time.

Source

pub async fn subscribe_trades( &self, instrument_id: InstrumentId, interval: Option<DeribitUpdateInterval>, ) -> DeribitWsResult<()>

Subscribes to trade updates for an instrument.

§Arguments
  • instrument_id - The instrument to subscribe to
  • interval - Update interval. Defaults to Ms100 (100ms). Raw requires authentication.
§Errors

Returns an error if subscription fails or raw is requested without authentication.

Source

pub async fn unsubscribe_trades( &self, instrument_id: InstrumentId, interval: Option<DeribitUpdateInterval>, ) -> DeribitWsResult<()>

Unsubscribes from trade updates for an instrument.

§Errors

Returns an error if unsubscription fails.

Source

pub async fn subscribe_book( &self, instrument_id: InstrumentId, interval: Option<DeribitUpdateInterval>, ) -> DeribitWsResult<()>

Subscribes to order book updates for an instrument.

§Arguments
  • instrument_id - The instrument to subscribe to
  • interval - Update interval. Defaults to Ms100 (100ms). Raw requires authentication.
§Errors

Returns an error if subscription fails or raw is requested without authentication.

Source

pub async fn unsubscribe_book( &self, instrument_id: InstrumentId, interval: Option<DeribitUpdateInterval>, ) -> DeribitWsResult<()>

Unsubscribes from order book updates for an instrument.

§Errors

Returns an error if unsubscription fails.

Source

pub async fn subscribe_book_grouped( &self, instrument_id: InstrumentId, group: &str, depth: u32, interval: Option<DeribitUpdateInterval>, ) -> DeribitWsResult<()>

Subscribes to grouped (depth-limited) order book updates for an instrument.

Uses the Deribit grouped book channel format: book.{instrument}.{group}.{depth}.{interval}

Depth is normalized to Deribit supported values: 1, 10, or 20.

§Errors

Returns an error if subscription fails or raw is requested without authentication.

Source

pub async fn unsubscribe_book_grouped( &self, instrument_id: InstrumentId, group: &str, depth: u32, interval: Option<DeribitUpdateInterval>, ) -> DeribitWsResult<()>

Unsubscribes from grouped (depth-limited) order book updates for an instrument.

Depth is normalized to Deribit supported values: 1, 10, or 20.

§Errors

Returns an error if unsubscription fails.

Source

pub async fn subscribe_ticker( &self, instrument_id: InstrumentId, interval: Option<DeribitUpdateInterval>, ) -> DeribitWsResult<()>

Subscribes to ticker updates for an instrument.

§Arguments
  • instrument_id - The instrument to subscribe to
  • interval - Update interval. Defaults to Ms100 (100ms). Raw requires authentication.
§Errors

Returns an error if subscription fails or raw is requested without authentication.

Source

pub async fn unsubscribe_ticker( &self, instrument_id: InstrumentId, interval: Option<DeribitUpdateInterval>, ) -> DeribitWsResult<()>

Unsubscribes from ticker updates for an instrument.

§Errors

Returns an error if unsubscription fails.

Source

pub async fn subscribe_quotes( &self, instrument_id: InstrumentId, ) -> DeribitWsResult<()>

Subscribes to quote (best bid/ask) updates for an instrument.

Note: Quote channel does not support interval parameter.

§Errors

Returns an error if subscription fails.

Source

pub async fn unsubscribe_quotes( &self, instrument_id: InstrumentId, ) -> DeribitWsResult<()>

Unsubscribes from quote updates for an instrument.

§Errors

Returns an error if unsubscription fails.

Source

pub async fn subscribe_instrument_state( &self, kind: &str, currency: &str, ) -> DeribitWsResult<()>

Subscribes to instrument state changes for lifecycle notifications.

Channel format: instrument.state.{kind}.{currency}

§Errors

Returns an error if subscription fails.

Source

pub async fn unsubscribe_instrument_state( &self, kind: &str, currency: &str, ) -> DeribitWsResult<()>

Unsubscribes from instrument state changes.

§Errors

Returns an error if unsubscription fails.

Source

pub async fn subscribe_perpetual_interests_rates_updates( &self, instrument_id: InstrumentId, interval: Option<DeribitUpdateInterval>, ) -> DeribitWsResult<()>

Subscribes to perpetual interest rates updates.

Channel format: perpetual.{instrument_name}.{interval}

§Errors

Returns an error if subscription fails.

Source

pub async fn unsubscribe_perpetual_interest_rates_updates( &self, instrument_id: InstrumentId, interval: Option<DeribitUpdateInterval>, ) -> DeribitWsResult<()>

Unsubscribes from perpetual interest rates updates.

§Errors

Returns an error if subscription fails.

Source

pub async fn subscribe_chart( &self, instrument_id: InstrumentId, resolution: &str, ) -> DeribitWsResult<()>

Subscribes to chart/OHLC bar updates for an instrument.

§Arguments
  • instrument_id - The instrument to subscribe to
  • resolution - Bar resolution: “1”, “3”, “5”, “10”, “15”, “30”, “60”, “120”, “180”, “360”, “720”, “1D” (minutes or 1D for daily)
§Errors

Returns an error if subscription fails.

Source

pub async fn unsubscribe_chart( &self, instrument_id: InstrumentId, resolution: &str, ) -> DeribitWsResult<()>

Unsubscribes from chart/OHLC bar updates.

§Errors

Returns an error if unsubscription fails.

Source

pub async fn subscribe_bars(&self, bar_type: BarType) -> DeribitWsResult<()>

Subscribes to bar updates for an instrument using a BarType specification.

Converts the BarType to the nearest supported Deribit resolution and subscribes to the chart channel.

§Errors

Returns an error if the subscription request fails.

Source

pub async fn unsubscribe_bars(&self, bar_type: BarType) -> DeribitWsResult<()>

Unsubscribes from bar updates for an instrument using a BarType specification.

§Errors

Returns an error if the unsubscription request fails.

Source

pub async fn subscribe_user_orders(&self) -> DeribitWsResult<()>

Subscribes to user order updates for all instruments.

Requires authentication. Subscribes to user.orders.any.any.raw channel.

§Errors

Returns an error if client is not authenticated or subscription fails.

Source

pub async fn unsubscribe_user_orders(&self) -> DeribitWsResult<()>

Unsubscribes from user order updates for all instruments.

§Errors

Returns an error if unsubscription fails.

Source

pub async fn subscribe_user_trades(&self) -> DeribitWsResult<()>

Subscribes to user trade/fill updates for all instruments.

Requires authentication. Subscribes to user.trades.any.any.raw channel.

§Errors

Returns an error if client is not authenticated or subscription fails.

Source

pub async fn unsubscribe_user_trades(&self) -> DeribitWsResult<()>

Unsubscribes from user trade/fill updates for all instruments.

§Errors

Returns an error if unsubscription fails.

Source

pub async fn subscribe_user_portfolio(&self) -> DeribitWsResult<()>

Subscribes to user portfolio updates for all currencies.

Requires authentication. Subscribes to user.portfolio.any channel which provides real-time account balance and margin updates for all currencies (BTC, ETH, USDC, USDT, etc.).

§Errors

Returns an error if client is not authenticated or subscription fails.

Source

pub async fn unsubscribe_user_portfolio(&self) -> DeribitWsResult<()>

Unsubscribes from user portfolio updates for all currencies.

§Errors

Returns an error if unsubscription fails.

Source

pub async fn subscribe(&self, channels: Vec<String>) -> DeribitWsResult<()>

Subscribes to multiple channels at once.

§Errors

Returns an error if subscription fails.

Source

pub async fn unsubscribe(&self, channels: Vec<String>) -> DeribitWsResult<()>

Unsubscribes from multiple channels at once.

§Errors

Returns an error if unsubscription fails.

Source

pub async fn submit_order( &self, order_side: OrderSide, params: DeribitOrderParams, client_order_id: ClientOrderId, trader_id: TraderId, strategy_id: StrategyId, instrument_id: InstrumentId, ) -> DeribitWsResult<()>

Submits an order to Deribit via WebSocket.

Routes to private/buy or private/sell JSON-RPC method based on order side. Requires authentication (call authenticate_session() first).

§Errors

Returns an error if:

  • The client is not authenticated
  • The command fails to send
Source

pub async fn modify_order( &self, order_id: &str, quantity: Quantity, price: Price, client_order_id: ClientOrderId, trader_id: TraderId, strategy_id: StrategyId, instrument_id: InstrumentId, ) -> DeribitWsResult<()>

Modifies an existing order on Deribit via WebSocket.

The order parameters are sent using the private/edit JSON-RPC method. Requires authentication (call authenticate_session() first).

§Errors

Returns an error if:

  • The client is not authenticated
  • The command fails to send
Source

pub async fn cancel_order( &self, order_id: &str, client_order_id: ClientOrderId, trader_id: TraderId, strategy_id: StrategyId, instrument_id: InstrumentId, ) -> DeribitWsResult<()>

Cancels an existing order on Deribit via WebSocket.

The order is cancelled using the private/cancel JSON-RPC method. Requires authentication (call authenticate_session() first).

§Errors

Returns an error if:

  • The client is not authenticated
  • The command fails to send
Source

pub async fn cancel_all_orders( &self, instrument_id: InstrumentId, order_type: Option<String>, ) -> DeribitWsResult<()>

Cancels all orders for a specific instrument on Deribit via WebSocket.

Uses the private/cancel_all_by_instrument JSON-RPC method. Requires authentication (call authenticate_session() first).

§Errors

Returns an error if:

  • The client is not authenticated
  • The command fails to send
Source

pub async fn query_order( &self, order_id: &str, client_order_id: ClientOrderId, trader_id: TraderId, strategy_id: StrategyId, instrument_id: InstrumentId, ) -> DeribitWsResult<()>

Queries the state of an order on Deribit via WebSocket.

Uses the private/get_order_state JSON-RPC method. Requires authentication (call authenticate_session() first).

§Errors

Returns an error if:

  • The client is not authenticated
  • The command fails to send
Source§

impl DeribitWebSocketClient

Source

pub fn py_url(&self) -> String

Source

pub fn py_is_testnet(&self) -> bool

Source

pub fn py_cancel_all_requests(&self)

Source

pub fn py_cache_instruments( &self, py: Python<'_>, instruments: Vec<Py<PyAny>>, ) -> PyResult<()>

§Errors

Returns an error if instrument conversion fails.

Source

pub fn py_cache_instrument( &self, py: Python<'_>, instrument: Py<PyAny>, ) -> PyResult<()>

§Errors

Returns an error if instrument conversion fails.

Source

pub fn py_set_account_id(&mut self, account_id: AccountId)

Source

pub fn py_set_bars_timestamp_on_close(&mut self, value: bool)

Trait Implementations§

Source§

impl Clone for DeribitWebSocketClient

Source§

fn clone(&self) -> DeribitWebSocketClient

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 DeribitWebSocketClient

Source§

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

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

impl<'py> IntoPyObject<'py> for DeribitWebSocketClient

Source§

type Target = DeribitWebSocketClient

The Python output type
Source§

type Output = Bound<'py, <DeribitWebSocketClient as IntoPyObject<'py>>::Target>

The smart pointer type to use. Read more
Source§

type Error = PyErr

The type returned in the event of a conversion error.
Source§

fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>

Performs the conversion.
Source§

impl PyClass for DeribitWebSocketClient

Source§

type Frozen = False

Whether the pyclass is frozen. Read more
Source§

impl PyClassImpl for DeribitWebSocketClient

Source§

const IS_BASETYPE: bool = false

#[pyclass(subclass)]
Source§

const IS_SUBCLASS: bool = false

#[pyclass(extends=…)]
Source§

const IS_MAPPING: bool = false

#[pyclass(mapping)]
Source§

const IS_SEQUENCE: bool = false

#[pyclass(sequence)]
Source§

const IS_IMMUTABLE_TYPE: bool = false

#[pyclass(immutable_type)]
Source§

const RAW_DOC: &'static CStr = /// WebSocket client for connecting to Deribit.

Docstring for the class provided on the struct or enum. Read more
Source§

const DOC: &'static CStr

Fully rendered class doc, including the text_signature if a constructor is defined. Read more
Source§

type BaseType = PyAny

Base class
Source§

type ThreadChecker = SendablePyClass<DeribitWebSocketClient>

This handles following two situations: Read more
Source§

type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild

Immutable or mutable
Source§

type Dict = PyClassDummySlot

Specify this class has #[pyclass(dict)] or not.
Source§

type WeakRef = PyClassDummySlot

Specify this class has #[pyclass(weakref)] or not.
Source§

type BaseNativeType = PyAny

The closest native ancestor. This is PyAny by default, and when you declare #[pyclass(extends=PyDict)], it’s PyDict.
Source§

fn items_iter() -> PyClassItemsIter

Source§

fn lazy_type_object() -> &'static LazyTypeObject<Self>

§

fn dict_offset() -> Option<isize>

§

fn weaklist_offset() -> Option<isize>

Source§

impl PyClassNewTextSignature for DeribitWebSocketClient

Source§

const TEXT_SIGNATURE: &'static str = "(url=None, api_key=None, api_secret=None, heartbeat_interval=None, is_testnet=False)"

Source§

impl PyMethods<DeribitWebSocketClient> for PyClassImplCollector<DeribitWebSocketClient>

Source§

fn py_methods(self) -> &'static PyClassItems

Source§

impl PyTypeInfo for DeribitWebSocketClient

Source§

const NAME: &'static str = "DeribitWebSocketClient"

Class name.
Source§

const MODULE: Option<&'static str>

Module name, if any.
Source§

fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject

Returns the PyTypeObject instance for this type.
§

fn type_object(py: Python<'_>) -> Bound<'_, PyType>

Returns the safe abstraction over the type object.
§

fn is_type_of(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type or a subclass of this type.
§

fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type.
Source§

impl DerefToPyAny for DeribitWebSocketClient

Source§

impl ExtractPyClassWithClone for DeribitWebSocketClient

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.

§

impl<'a, 'py, T> FromPyObject<'a, 'py> for T
where T: PyClass + Clone + ExtractPyClassWithClone,

§

type Error = PyClassGuardError<'a, 'py>

The type returned in the event of a conversion error. Read more
§

fn extract( obj: Borrowed<'a, 'py, PyAny>, ) -> Result<T, <T as FromPyObject<'a, 'py>>::Error>

Extracts Self from the bound smart pointer obj. Read more
§

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<'py, T> IntoPyObjectExt<'py> for T
where T: IntoPyObject<'py>,

§

fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>

Converts self into an owned Python object, dropping type information.
§

fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>

Converts self into an owned Python object, dropping type information and unbinding it from the 'py lifetime.
§

fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>

Converts self into a Python object. Read more
§

impl<'py, T> IntoPyObjectNautilusExt<'py> for T
where T: IntoPyObjectExt<'py>,

§

fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>

Convert self into a [Py<PyAny>] while panicking if the conversion fails. 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
§

impl<T> PyErrArguments for T
where T: for<'py> IntoPyObject<'py> + Send + Sync,

§

fn arguments(self, py: Python<'_>) -> Py<PyAny>

Arguments for exception
§

impl<T> PyTypeCheck for T
where T: PyTypeInfo,

§

const NAME: &'static str = T::NAME

👎Deprecated since 0.27.0: Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.
Name of self. This is used in error messages, for example.
§

fn type_check(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of Self, which may include a subtype. Read more
§

fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>

Returns the expected type as a possible argument for the isinstance and issubclass function. 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.
§

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<'py, T> FromPyObjectOwned<'py> for T
where T: for<'a> FromPyObject<'a, 'py>,

§

impl<T> Ungil for T
where T: Send,