# pyo3::types::PySliceIndices - Rust
Represents Python `slice` indices.
Keywords: rust, rustlang, rust-lang, PySliceIndices

# Struct pyo3::types::PySliceIndices [−] [src]

    pub struct PySliceIndices {
        pub start: isize,
        pub stop: isize,
        pub step: isize,
        pub slicelength: isize,
    }

Represents Python `slice` indices.

## Fields

`start: isize` `stop: isize` `step: isize` `slicelength: isize`

## Implementations

### `impl PySliceIndices` [src]

#### `pub fn new(start: isize, stop: isize, step: isize) -> PySliceIndices` [src]

## Trait Implementations

### `impl ToPyObject for PySliceIndices` [src]

#### `fn to_object(&self, py: Python<'_>) -> PyObject` [src]

Converts self into a Python object.

## Auto Trait Implementations

### `impl RefUnwindSafe for PySliceIndices`

### `impl Send for PySliceIndices`

### `impl Sync for PySliceIndices`

### `impl Unpin for PySliceIndices`

### `impl UnwindSafe for PySliceIndices`

## Blanket Implementations

### `impl<T> Any for T where
T: 'static + ?Sized,` [src]

#### `pub fn type_id(&self) -> TypeId` [src]

Gets the `TypeId` of `self`. Read more

### `impl<T> Borrow<T> for T where
T: ?Sized,` [src]

#### `pub fn borrow(&self) -> &T` [src]

Immutably borrows from an owned value. Read more

### `impl<T> BorrowMut<T> for T where
T: ?Sized,` [src]

#### `pub fn borrow_mut(&mut self) -> &mut T` [src]

Mutably borrows from an owned value. Read more

### `impl<T> From<T> for T` [src]

#### `pub fn from(t: T) -> T` [src]

Performs the conversion.

### `impl<T, U> Into<U> for T where
U: From<T>,` [src]

#### `pub fn into(self) -> U` [src]

Performs the conversion.

### `impl<T> ToBorrowedObject for T where
T: ToPyObject,` [src]

#### `fn with_borrowed_ptr<F, R>(&self, py: Python<'_>, f: F) -> R where
F: FnOnce(*mut PyObject) -> R,` [src]

Converts self into a Python object and calls the specified closure on the native FFI pointer underlying the Python object. Read more

### `impl<T, U> TryFrom<U> for T where
U: Into<T>,` [src]

#### `type Error = Infallible`

The type returned in the event of a conversion error.

#### `pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>` [src]

Performs the conversion.

### `impl<T, U> TryInto<U> for T where
U: TryFrom<T>,` [src]

#### `type Error = <U as TryFrom<T>>::Error`

The type returned in the event of a conversion error.

#### `pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>` [src]

Performs the conversion.