Trait pyo3::types::dict::PyDictItem

source ·
pub trait PyDictItem {
    type K: ToPyObject;
    type V: ToPyObject;

    // Required methods
    fn key(&self) -> &Self::K;
    fn value(&self) -> &Self::V;
}
Expand description

Represents a tuple which can be used as a PyDict item.

Required Associated Types§

Required Methods§

source

fn key(&self) -> &Self::K

source

fn value(&self) -> &Self::V

Implementations on Foreign Types§

source§

impl<K, V> PyDictItem for &(K, V)
where K: ToPyObject, V: ToPyObject,

§

type K = K

§

type V = V

source§

fn key(&self) -> &Self::K

source§

fn value(&self) -> &Self::V

source§

impl<K, V> PyDictItem for (K, V)
where K: ToPyObject, V: ToPyObject,

§

type K = K

§

type V = V

source§

fn key(&self) -> &Self::K

source§

fn value(&self) -> &Self::V

Implementors§

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