pub struct PySliceIndices {
pub start: isize,
pub stop: isize,
pub step: isize,
pub slicelength: usize,
}
Expand description
Return value from PySliceMethods::indices
.
Fields§
§start: isize
Start of the slice
It can be -1 when the step is negative, otherwise it’s non-negative.
stop: isize
End of the slice
It can be -1 when the step is negative, otherwise it’s non-negative.
step: isize
Increment to use when iterating the slice from start
to stop
.
slicelength: usize
The length of the slice calculated from the original input sequence.
Implementations§
Trait Implementations§
Source§impl Debug for PySliceIndices
impl Debug for PySliceIndices
Source§impl<'py> IntoPyObject<'py> for &PySliceIndices
impl<'py> IntoPyObject<'py> for &PySliceIndices
Source§type Output = Bound<'py, <&PySliceIndices as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <&PySliceIndices as IntoPyObject<'py>>::Target>
The smart pointer type to use. Read more
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of a conversion error.
Source§impl<'py> IntoPyObject<'py> for PySliceIndices
impl<'py> IntoPyObject<'py> for PySliceIndices
Source§type Output = Bound<'py, <PySliceIndices as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <PySliceIndices as IntoPyObject<'py>>::Target>
The smart pointer type to use. Read more
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of a conversion error.
Source§impl PartialEq for PySliceIndices
impl PartialEq for PySliceIndices
Source§impl ToPyObject for PySliceIndices
impl ToPyObject for PySliceIndices
impl Eq for PySliceIndices
impl StructuralPartialEq for PySliceIndices
Auto Trait Implementations§
impl Freeze for PySliceIndices
impl RefUnwindSafe for PySliceIndices
impl Send for PySliceIndices
impl Sync for PySliceIndices
impl Unpin for PySliceIndices
impl UnwindSafe for PySliceIndices
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
Source§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>>
fn into_bound_py_any(self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>>
Converts
self
into an owned Python object, dropping type information.