pyo3::pycell::impl_

Trait PyClassBorrowChecker

Source
pub trait PyClassBorrowChecker {
    // Required methods
    fn new() -> Self;
    fn try_borrow(&self) -> Result<(), PyBorrowError>;
    fn release_borrow(&self);
    fn try_borrow_mut(&self) -> Result<(), PyBorrowMutError>;
    fn release_borrow_mut(&self);
}

Required Methods§

Source

fn new() -> Self

Initial value for self

Source

fn try_borrow(&self) -> Result<(), PyBorrowError>

Increments immutable borrow count, if possible

Source

fn release_borrow(&self)

Decrements immutable borrow count

Source

fn try_borrow_mut(&self) -> Result<(), PyBorrowMutError>

Increments mutable borrow count, if possible

Source

fn release_borrow_mut(&self)

Decremements mutable borrow count

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§

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