pub trait Object: Sized {
// Provided methods
fn id(&self) -> usize { ... }
fn type(&self) -> String { ... }
fn is<T: Object>(&self, other: &Option<T>) -> bool { ... }
fn __getattribute__(&self, _name: impl AsRef<str>) -> Option<impl Object> { ... }
fn __dir__(&self) -> Vec<impl AsRef<str>> { ... }
}Expand description
The Python Object. Anything that implements this trait is a Python Object.
Provided Methods§
Sourcefn id(&self) -> usize
fn id(&self) -> usize
Returns the unique identifier of the object, which is the memory address of the object.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".