pub struct PyInt(/* private fields */);
Expand description
Represents a Python int
object.
Values of this type are accessed via PyO3’s smart pointers, e.g. as
Py<PyLong>
or Bound<'py, PyLong>
.
You can usually avoid directly working with this type
by using ToPyObject
and extract
with the primitive Rust integer types.
Trait Implementations§
Source§impl AsPyPointer for PyLong
impl AsPyPointer for PyLong
Source§impl PyTypeInfo for PyLong
impl PyTypeInfo for PyLong
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
Source§fn is_type_of_bound(obj: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(obj: &Bound<'_, PyAny>) -> bool
Checks if
object
is an instance of this type or a subclass of this type.impl DerefToPyAny for PyLong
Auto Trait Implementations§
impl !Freeze for PyLong
impl !RefUnwindSafe for PyLong
impl !Send for PyLong
impl !Sync for PyLong
impl Unpin for PyLong
impl UnwindSafe for PyLong
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more