pub struct BybitWebSocketClient { /* private fields */ }Expand description
Public/market data WebSocket client for Bybit.
Implementations§
Source§impl BybitWebSocketClient
impl BybitWebSocketClient
Sourcepub fn new_public(url: Option<String>, heartbeat: Option<u64>) -> Self
pub fn new_public(url: Option<String>, heartbeat: Option<u64>) -> Self
Creates a new Bybit public WebSocket client.
Sourcepub fn new_public_with(
product_type: BybitProductType,
environment: BybitEnvironment,
url: Option<String>,
heartbeat: Option<u64>,
) -> Self
pub fn new_public_with( product_type: BybitProductType, environment: BybitEnvironment, url: Option<String>, heartbeat: Option<u64>, ) -> Self
Creates a new Bybit public WebSocket client targeting the specified product/environment.
Sourcepub fn new_private(
environment: BybitEnvironment,
credential: Credential,
url: Option<String>,
heartbeat: Option<u64>,
) -> Self
pub fn new_private( environment: BybitEnvironment, credential: Credential, url: Option<String>, heartbeat: Option<u64>, ) -> Self
Creates a new Bybit private WebSocket client.
Sourcepub fn new_trade(
environment: BybitEnvironment,
credential: Credential,
url: Option<String>,
heartbeat: Option<u64>,
) -> Self
pub fn new_trade( environment: BybitEnvironment, credential: Credential, url: Option<String>, heartbeat: Option<u64>, ) -> Self
Creates a new Bybit trade WebSocket client for order operations.
Sourcepub async fn connect(&mut self) -> BybitWsResult<()>
pub async fn connect(&mut self) -> BybitWsResult<()>
Establishes the WebSocket connection.
§Errors
Returns an error if the underlying WebSocket connection cannot be established, after retrying multiple times with exponential backoff.
Sourcepub async fn close(&mut self) -> BybitWsResult<()>
pub async fn close(&mut self) -> BybitWsResult<()>
Disconnects the WebSocket client and stops the background task.
Sourcepub async fn wait_until_active(&self, timeout_secs: f64) -> BybitWsResult<()>
pub async fn wait_until_active(&self, timeout_secs: f64) -> BybitWsResult<()>
Waits until the WebSocket client becomes active or times out.
§Errors
Returns an error if the timeout is exceeded before the client becomes active.
Sourcepub async fn subscribe(&self, topics: Vec<String>) -> BybitWsResult<()>
pub async fn subscribe(&self, topics: Vec<String>) -> BybitWsResult<()>
Subscribe to the provided topic strings.
Sourcepub async fn unsubscribe(&self, topics: Vec<String>) -> BybitWsResult<()>
pub async fn unsubscribe(&self, topics: Vec<String>) -> BybitWsResult<()>
Unsubscribe from the provided topics.
Sourcepub fn stream(&mut self) -> impl Stream<Item = NautilusWsMessage> + use<>
pub fn stream(&mut self) -> impl Stream<Item = NautilusWsMessage> + use<>
Returns a stream of parsed NautilusWsMessage items.
§Panics
Panics if called before Self::connect or if the stream has already been taken.
Sourcepub fn subscription_count(&self) -> usize
pub fn subscription_count(&self) -> usize
Returns the number of currently registered subscriptions.
Sourcepub fn credential(&self) -> Option<&Credential>
pub fn credential(&self) -> Option<&Credential>
Returns the credential associated with this client, if any.
Sourcepub fn cache_instrument(&self, instrument: InstrumentAny)
pub fn cache_instrument(&self, instrument: InstrumentAny)
Caches a single instrument.
Any existing instrument with the same ID will be replaced.
Sourcepub fn cache_instruments(&mut self, instruments: Vec<InstrumentAny>)
pub fn cache_instruments(&mut self, instruments: Vec<InstrumentAny>)
Caches multiple instruments.
Clears the existing cache first, then adds all provided instruments.
Sourcepub fn set_account_id(&mut self, account_id: AccountId)
pub fn set_account_id(&mut self, account_id: AccountId)
Sets the account ID for account message parsing.
Sourcepub fn set_mm_level(&self, mm_level: u8)
pub fn set_mm_level(&self, mm_level: u8)
Sets the account market maker level.
Sourcepub fn instruments(&self) -> &Arc<DashMap<Ustr, InstrumentAny>>
pub fn instruments(&self) -> &Arc<DashMap<Ustr, InstrumentAny>>
Returns a reference to the instruments cache.
Sourcepub fn account_id(&self) -> Option<AccountId>
pub fn account_id(&self) -> Option<AccountId>
Returns the account ID if set.
Sourcepub fn product_type(&self) -> Option<BybitProductType>
pub fn product_type(&self) -> Option<BybitProductType>
Returns the product type for public connections.
Sourcepub async fn subscribe_orderbook(
&self,
instrument_id: InstrumentId,
depth: u32,
) -> BybitWsResult<()>
pub async fn subscribe_orderbook( &self, instrument_id: InstrumentId, depth: u32, ) -> BybitWsResult<()>
Subscribes to orderbook updates for a specific instrument.
§Errors
Returns an error if the subscription request fails.
§References
https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
Sourcepub async fn unsubscribe_orderbook(
&self,
instrument_id: InstrumentId,
depth: u32,
) -> BybitWsResult<()>
pub async fn unsubscribe_orderbook( &self, instrument_id: InstrumentId, depth: u32, ) -> BybitWsResult<()>
Unsubscribes from orderbook updates for a specific instrument.
Sourcepub async fn subscribe_trades(
&self,
instrument_id: InstrumentId,
) -> BybitWsResult<()>
pub async fn subscribe_trades( &self, instrument_id: InstrumentId, ) -> BybitWsResult<()>
Subscribes to public trade updates for a specific instrument.
§Errors
Returns an error if the subscription request fails.
§References
https://bybit-exchange.github.io/docs/v5/websocket/public/trade
Sourcepub async fn unsubscribe_trades(
&self,
instrument_id: InstrumentId,
) -> BybitWsResult<()>
pub async fn unsubscribe_trades( &self, instrument_id: InstrumentId, ) -> BybitWsResult<()>
Unsubscribes from public trade updates for a specific instrument.
Sourcepub async fn subscribe_ticker(
&self,
instrument_id: InstrumentId,
) -> BybitWsResult<()>
pub async fn subscribe_ticker( &self, instrument_id: InstrumentId, ) -> BybitWsResult<()>
Subscribes to ticker updates for a specific instrument.
§Errors
Returns an error if the subscription request fails.
§References
https://bybit-exchange.github.io/docs/v5/websocket/public/ticker
Sourcepub async fn unsubscribe_ticker(
&self,
instrument_id: InstrumentId,
) -> BybitWsResult<()>
pub async fn unsubscribe_ticker( &self, instrument_id: InstrumentId, ) -> BybitWsResult<()>
Unsubscribes from ticker updates for a specific instrument.
Sourcepub async fn subscribe_klines(
&self,
instrument_id: InstrumentId,
interval: impl Into<String>,
) -> BybitWsResult<()>
pub async fn subscribe_klines( &self, instrument_id: InstrumentId, interval: impl Into<String>, ) -> BybitWsResult<()>
Subscribes to kline/candlestick updates for a specific instrument.
§Errors
Returns an error if the subscription request fails.
§References
https://bybit-exchange.github.io/docs/v5/websocket/public/kline
Sourcepub async fn unsubscribe_klines(
&self,
instrument_id: InstrumentId,
interval: impl Into<String>,
) -> BybitWsResult<()>
pub async fn unsubscribe_klines( &self, instrument_id: InstrumentId, interval: impl Into<String>, ) -> BybitWsResult<()>
Unsubscribes from kline/candlestick updates for a specific instrument.
Sourcepub async fn subscribe_orders(&self) -> BybitWsResult<()>
pub async fn subscribe_orders(&self) -> BybitWsResult<()>
Subscribes to order updates.
§Errors
Returns an error if the subscription request fails or if not authenticated.
§References
https://bybit-exchange.github.io/docs/v5/websocket/private/order
Sourcepub async fn unsubscribe_orders(&self) -> BybitWsResult<()>
pub async fn unsubscribe_orders(&self) -> BybitWsResult<()>
Unsubscribes from order updates.
Sourcepub async fn subscribe_executions(&self) -> BybitWsResult<()>
pub async fn subscribe_executions(&self) -> BybitWsResult<()>
Subscribes to execution/fill updates.
§Errors
Returns an error if the subscription request fails or if not authenticated.
§References
https://bybit-exchange.github.io/docs/v5/websocket/private/execution
Sourcepub async fn unsubscribe_executions(&self) -> BybitWsResult<()>
pub async fn unsubscribe_executions(&self) -> BybitWsResult<()>
Unsubscribes from execution/fill updates.
Sourcepub async fn subscribe_positions(&self) -> BybitWsResult<()>
pub async fn subscribe_positions(&self) -> BybitWsResult<()>
Subscribes to position updates.
§Errors
Returns an error if the subscription request fails or if not authenticated.
§References
https://bybit-exchange.github.io/docs/v5/websocket/private/position
Sourcepub async fn unsubscribe_positions(&self) -> BybitWsResult<()>
pub async fn unsubscribe_positions(&self) -> BybitWsResult<()>
Unsubscribes from position updates.
Sourcepub async fn subscribe_wallet(&self) -> BybitWsResult<()>
pub async fn subscribe_wallet(&self) -> BybitWsResult<()>
Subscribes to wallet/balance updates.
§Errors
Returns an error if the subscription request fails or if not authenticated.
§References
https://bybit-exchange.github.io/docs/v5/websocket/private/wallet
Sourcepub async fn unsubscribe_wallet(&self) -> BybitWsResult<()>
pub async fn unsubscribe_wallet(&self) -> BybitWsResult<()>
Unsubscribes from wallet/balance updates.
Sourcepub async fn place_order(
&self,
params: BybitWsPlaceOrderParams,
client_order_id: ClientOrderId,
trader_id: TraderId,
strategy_id: StrategyId,
instrument_id: InstrumentId,
) -> BybitWsResult<()>
pub async fn place_order( &self, params: BybitWsPlaceOrderParams, client_order_id: ClientOrderId, trader_id: TraderId, strategy_id: StrategyId, instrument_id: InstrumentId, ) -> BybitWsResult<()>
Places an order via WebSocket.
§Errors
Returns an error if the order request fails or if not authenticated.
§References
https://bybit-exchange.github.io/docs/v5/websocket/trade/guideline
Sourcepub async fn amend_order(
&self,
params: BybitWsAmendOrderParams,
client_order_id: ClientOrderId,
trader_id: TraderId,
strategy_id: StrategyId,
instrument_id: InstrumentId,
venue_order_id: Option<VenueOrderId>,
) -> BybitWsResult<()>
pub async fn amend_order( &self, params: BybitWsAmendOrderParams, client_order_id: ClientOrderId, trader_id: TraderId, strategy_id: StrategyId, instrument_id: InstrumentId, venue_order_id: Option<VenueOrderId>, ) -> BybitWsResult<()>
Amends an existing order via WebSocket.
§Errors
Returns an error if the amend request fails or if not authenticated.
§References
https://bybit-exchange.github.io/docs/v5/websocket/trade/guideline
Sourcepub async fn cancel_order(
&self,
params: BybitWsCancelOrderParams,
client_order_id: ClientOrderId,
trader_id: TraderId,
strategy_id: StrategyId,
instrument_id: InstrumentId,
venue_order_id: Option<VenueOrderId>,
) -> BybitWsResult<()>
pub async fn cancel_order( &self, params: BybitWsCancelOrderParams, client_order_id: ClientOrderId, trader_id: TraderId, strategy_id: StrategyId, instrument_id: InstrumentId, venue_order_id: Option<VenueOrderId>, ) -> BybitWsResult<()>
Cancels an order via WebSocket.
§Errors
Returns an error if the cancel request fails or if not authenticated.
§References
https://bybit-exchange.github.io/docs/v5/websocket/trade/guideline
Sourcepub async fn batch_place_orders(
&self,
trader_id: TraderId,
strategy_id: StrategyId,
orders: Vec<BybitWsPlaceOrderParams>,
) -> BybitWsResult<()>
pub async fn batch_place_orders( &self, trader_id: TraderId, strategy_id: StrategyId, orders: Vec<BybitWsPlaceOrderParams>, ) -> BybitWsResult<()>
Batch creates multiple orders via WebSocket.
§Errors
Returns an error if the batch request fails or if not authenticated.
§References
https://bybit-exchange.github.io/docs/v5/websocket/trade/guideline
Sourcepub async fn batch_amend_orders(
&self,
trader_id: TraderId,
strategy_id: StrategyId,
orders: Vec<BybitWsAmendOrderParams>,
) -> BybitWsResult<()>
pub async fn batch_amend_orders( &self, trader_id: TraderId, strategy_id: StrategyId, orders: Vec<BybitWsAmendOrderParams>, ) -> BybitWsResult<()>
Batch amends multiple orders via WebSocket.
§Errors
Returns an error if the batch request fails or if not authenticated.
Sourcepub async fn batch_cancel_orders(
&self,
orders: Vec<BybitWsCancelOrderParams>,
) -> BybitWsResult<()>
pub async fn batch_cancel_orders( &self, orders: Vec<BybitWsCancelOrderParams>, ) -> BybitWsResult<()>
Batch cancels multiple orders via WebSocket.
§Errors
Returns an error if the batch request fails or if not authenticated.
Sourcepub async fn submit_order(
&self,
product_type: BybitProductType,
trader_id: TraderId,
strategy_id: StrategyId,
instrument_id: InstrumentId,
client_order_id: ClientOrderId,
order_side: OrderSide,
order_type: OrderType,
quantity: Quantity,
is_quote_quantity: bool,
time_in_force: Option<TimeInForce>,
price: Option<Price>,
trigger_price: Option<Price>,
post_only: Option<bool>,
reduce_only: Option<bool>,
is_leverage: bool,
) -> BybitWsResult<()>
pub async fn submit_order( &self, product_type: BybitProductType, trader_id: TraderId, strategy_id: StrategyId, instrument_id: InstrumentId, client_order_id: ClientOrderId, order_side: OrderSide, order_type: OrderType, quantity: Quantity, is_quote_quantity: bool, time_in_force: Option<TimeInForce>, price: Option<Price>, trigger_price: Option<Price>, post_only: Option<bool>, reduce_only: Option<bool>, is_leverage: bool, ) -> BybitWsResult<()>
Submits an order using Nautilus domain objects.
§Errors
Returns an error if order submission fails or if not authenticated.
Sourcepub async fn modify_order(
&self,
product_type: BybitProductType,
trader_id: TraderId,
strategy_id: StrategyId,
instrument_id: InstrumentId,
client_order_id: ClientOrderId,
venue_order_id: Option<VenueOrderId>,
quantity: Option<Quantity>,
price: Option<Price>,
) -> BybitWsResult<()>
pub async fn modify_order( &self, product_type: BybitProductType, trader_id: TraderId, strategy_id: StrategyId, instrument_id: InstrumentId, client_order_id: ClientOrderId, venue_order_id: Option<VenueOrderId>, quantity: Option<Quantity>, price: Option<Price>, ) -> BybitWsResult<()>
Modifies an existing order using Nautilus domain objects.
§Errors
Returns an error if modification fails or if not authenticated.
Sourcepub async fn cancel_order_by_id(
&self,
product_type: BybitProductType,
trader_id: TraderId,
strategy_id: StrategyId,
instrument_id: InstrumentId,
client_order_id: ClientOrderId,
venue_order_id: Option<VenueOrderId>,
) -> BybitWsResult<()>
pub async fn cancel_order_by_id( &self, product_type: BybitProductType, trader_id: TraderId, strategy_id: StrategyId, instrument_id: InstrumentId, client_order_id: ClientOrderId, venue_order_id: Option<VenueOrderId>, ) -> BybitWsResult<()>
Cancels an order using Nautilus domain objects.
§Errors
Returns an error if cancellation fails or if not authenticated.
Sourcepub async fn batch_cancel_orders_by_id(
&self,
product_type: BybitProductType,
trader_id: TraderId,
strategy_id: StrategyId,
instrument_ids: Vec<InstrumentId>,
venue_order_ids: Vec<Option<VenueOrderId>>,
client_order_ids: Vec<Option<ClientOrderId>>,
) -> BybitWsResult<()>
pub async fn batch_cancel_orders_by_id( &self, product_type: BybitProductType, trader_id: TraderId, strategy_id: StrategyId, instrument_ids: Vec<InstrumentId>, venue_order_ids: Vec<Option<VenueOrderId>>, client_order_ids: Vec<Option<ClientOrderId>>, ) -> BybitWsResult<()>
Batch cancels multiple orders using Nautilus domain objects.
§Errors
Returns an error if batch cancellation fails or if not authenticated.
Sourcepub fn build_place_order_params(
&self,
product_type: BybitProductType,
instrument_id: InstrumentId,
client_order_id: ClientOrderId,
order_side: OrderSide,
order_type: OrderType,
quantity: Quantity,
is_quote_quantity: bool,
time_in_force: Option<TimeInForce>,
price: Option<Price>,
trigger_price: Option<Price>,
post_only: Option<bool>,
reduce_only: Option<bool>,
is_leverage: bool,
) -> BybitWsResult<BybitWsPlaceOrderParams>
pub fn build_place_order_params( &self, product_type: BybitProductType, instrument_id: InstrumentId, client_order_id: ClientOrderId, order_side: OrderSide, order_type: OrderType, quantity: Quantity, is_quote_quantity: bool, time_in_force: Option<TimeInForce>, price: Option<Price>, trigger_price: Option<Price>, post_only: Option<bool>, reduce_only: Option<bool>, is_leverage: bool, ) -> BybitWsResult<BybitWsPlaceOrderParams>
Builds order params for placing an order.
Sourcepub fn build_amend_order_params(
&self,
product_type: BybitProductType,
instrument_id: InstrumentId,
venue_order_id: Option<VenueOrderId>,
client_order_id: Option<ClientOrderId>,
quantity: Option<Quantity>,
price: Option<Price>,
) -> BybitWsResult<BybitWsAmendOrderParams>
pub fn build_amend_order_params( &self, product_type: BybitProductType, instrument_id: InstrumentId, venue_order_id: Option<VenueOrderId>, client_order_id: Option<ClientOrderId>, quantity: Option<Quantity>, price: Option<Price>, ) -> BybitWsResult<BybitWsAmendOrderParams>
Builds order params for amending an order.
Source§impl BybitWebSocketClient
impl BybitWebSocketClient
pub fn py_api_key_masked(&self) -> Option<String>
Trait Implementations§
Source§impl Clone for BybitWebSocketClient
impl Clone for BybitWebSocketClient
Source§impl Debug for BybitWebSocketClient
impl Debug for BybitWebSocketClient
Source§impl<'py> IntoPyObject<'py> for BybitWebSocketClient
impl<'py> IntoPyObject<'py> for BybitWebSocketClient
Source§type Target = BybitWebSocketClient
type Target = BybitWebSocketClient
Source§type Output = Bound<'py, <BybitWebSocketClient as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <BybitWebSocketClient as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for BybitWebSocketClient
impl PyClass for BybitWebSocketClient
Source§impl PyClassImpl for BybitWebSocketClient
impl PyClassImpl for BybitWebSocketClient
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// Public/market data WebSocket client for Bybit.
const RAW_DOC: &'static CStr = /// Public/market data WebSocket client for Bybit.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type ThreadChecker = SendablePyClass<BybitWebSocketClient>
type ThreadChecker = SendablePyClass<BybitWebSocketClient>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyMethods<BybitWebSocketClient> for PyClassImplCollector<BybitWebSocketClient>
impl PyMethods<BybitWebSocketClient> for PyClassImplCollector<BybitWebSocketClient>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for BybitWebSocketClient
impl PyTypeInfo for BybitWebSocketClient
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.impl DerefToPyAny for BybitWebSocketClient
impl ExtractPyClassWithClone for BybitWebSocketClient
Auto Trait Implementations§
impl Freeze for BybitWebSocketClient
impl !RefUnwindSafe for BybitWebSocketClient
impl Send for BybitWebSocketClient
impl Sync for BybitWebSocketClient
impl Unpin for BybitWebSocketClient
impl !UnwindSafe for BybitWebSocketClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
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>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read moreSource§impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
Source§fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>
fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§const NAME: &'static str = T::NAME
const NAME: &'static str = T::NAME
§fn type_check(object: &Bound<'_, PyAny>) -> bool
fn type_check(object: &Bound<'_, PyAny>) -> bool
§fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
isinstance and issubclass function. Read more