pub struct PySlice(/* private fields */);
Expand description
Represents a Python slice
.
Values of this type are accessed via PyO3’s smart pointers, e.g. as
Py<PySlice>
or Bound<'py, PySlice>
.
For APIs available on slice
objects, see the PySliceMethods
trait which is implemented for
Bound<'py, PySlice>
.
Only isize
indices supported at the moment by the PySlice
object.
Implementations§
Trait Implementations§
Source§impl AsPyPointer for PySlice
impl AsPyPointer for PySlice
Source§impl PyTypeInfo for PySlice
impl PyTypeInfo for PySlice
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 PySlice
impl PyLayout<PySlice> for PySliceObject
impl PySizedLayout<PySlice> for PySliceObject
Auto Trait Implementations§
impl !Freeze for PySlice
impl !RefUnwindSafe for PySlice
impl !Send for PySlice
impl !Sync for PySlice
impl Unpin for PySlice
impl UnwindSafe for PySlice
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