pub struct PySliceIndices {
pub start: isize,
pub stop: isize,
pub step: isize,
pub slicelength: usize,
}Expand description
Return value from PySliceMethods::indices.
Fields§
§start: isizeStart of the slice
It can be -1 when the step is negative, otherwise it’s non-negative.
stop: isizeEnd of the slice
It can be -1 when the step is negative, otherwise it’s non-negative.
step: isizeIncrement to use when iterating the slice from start to stop.
slicelength: usizeThe 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§fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Performs the conversion.
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
Extracts the type hint information for this type when it appears as a return value. Read more
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§fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Performs the conversion.
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
Extracts the type hint information for this type when it appears as a return value. Read more
Source§impl PartialEq for PySliceIndices
impl PartialEq 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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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.