Struct pyo3::sync::Interned

source ·
#[doc(hidden)] pub struct Interned(&'static str, GILOnceCell<Py<PyString>>);
Expand description

Implementation detail for intern! macro.

Tuple Fields§

§0: &'static str§1: GILOnceCell<Py<PyString>>

Implementations§

source§

impl Interned

source

pub const fn new(value: &'static str) -> Self

Creates an empty holder for an interned str.

source

pub fn get<'py>(&self, py: Python<'py>) -> &Bound<'py, PyString>

Gets or creates the interned str value.

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