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 Eq for PySliceIndices
 
impl Eq for PySliceIndices
#[doc(hidden)] fn assert_receiver_is_total_eq(&self)
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
Available on crate feature 
experimental-inspect only.Extracts the type hint information for this type when it appears as a return value. Read more
Source§#[doc(hidden)] fn owned_sequence_into_pyobject<I>(
    iter: I,
    py: Python<'py>,
    _: Token,
) -> Result<Bound<'py, PyAny>, PyErr>
 
#[doc(hidden)] fn owned_sequence_into_pyobject<I>( iter: I, py: Python<'py>, _: Token, ) -> Result<Bound<'py, PyAny>, PyErr>
Converts sequence of Self into a Python object. Used to specialize 
Vec<u8>, [u8; N]
and SmallVec<[u8; N]> as a sequence of bytes into a bytes object.Source§#[doc(hidden)] fn borrowed_sequence_into_pyobject<I>(
    iter: I,
    py: Python<'py>,
    _: Token,
) -> Result<Bound<'py, PyAny>, PyErr>where
    Self: Reference,
    I: IntoIterator<Item = Self> + AsRef<[<Self as Reference>::BaseType]>,
    I::IntoIter: ExactSizeIterator<Item = Self>,
 
#[doc(hidden)] fn borrowed_sequence_into_pyobject<I>(
    iter: I,
    py: Python<'py>,
    _: Token,
) -> Result<Bound<'py, PyAny>, PyErr>where
    Self: Reference,
    I: IntoIterator<Item = Self> + AsRef<[<Self as Reference>::BaseType]>,
    I::IntoIter: ExactSizeIterator<Item = Self>,
Converts sequence of Self into a Python object. Used to specialize 
&[u8] and Cow<[u8]>
as a sequence of bytes into a bytes object.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
Available on crate feature 
experimental-inspect only.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 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> AssertNotZeroSized for T
 
impl<T> AssertNotZeroSized for T
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> IntoPyCallbackOutput<'py, *mut PyObject> for Twhere
    T: IntoPyObject<'py>,
 
impl<'py, T> IntoPyCallbackOutput<'py, *mut PyObject> for Twhere
    T: IntoPyObject<'py>,
Source§impl<'py, T> IntoPyCallbackOutput<'py, Py<PyAny>> for Twhere
    T: IntoPyObject<'py>,
 
impl<'py, T> IntoPyCallbackOutput<'py, Py<PyAny>> for Twhere
    T: IntoPyObject<'py>,
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.Source§impl<T> PyErrArguments for T
 
impl<T> PyErrArguments for T
Source§impl<T> SizedTypeProperties for T
 
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const IS_ZST: bool = _
 
#[doc(hidden)] const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)] const LAYOUT: Layout = _
 
#[doc(hidden)] const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
 
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)The largest safe length for a 
[Self]. Read more