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§
Sourcefn try_borrow(&self) -> Result<(), PyBorrowError>
fn try_borrow(&self) -> Result<(), PyBorrowError>
Increments immutable borrow count, if possible
Sourcefn release_borrow(&self)
fn release_borrow(&self)
Decrements immutable borrow count
Sourcefn try_borrow_mut(&self) -> Result<(), PyBorrowMutError>
fn try_borrow_mut(&self) -> Result<(), PyBorrowMutError>
Increments mutable borrow count, if possible
Sourcefn release_borrow_mut(&self)
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.