pyo3::impl_::pyclass::probes

Trait Probe

Source
pub trait Probe {
    const VALUE: bool = false;
}
Expand description

Trait used to combine with zero-sized types to calculate at compile time some property of a type.

The trick uses the fact that an associated constant has higher priority than a trait constant, so we can use the trait to define the false case.

The true case is defined in the zero-sized type’s impl block, which is gated on some property like trait bound or only being implemented for fixed concrete types.

Provided Associated Constants§

Source

const VALUE: bool = false

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> Probe for IsIntoPy<T>

Source§

impl<T> Probe for IsIntoPyObject<T>

Source§

impl<T> Probe for IsIntoPyObjectRef<T>

Source§

impl<T> Probe for IsPyT<T>

Source§

impl<T> Probe for IsSync<T>

Source§

impl<T> Probe for IsToPyObject<T>

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here