Struct pyo3::PySlice [] [src]

pub struct PySlice(_);

Represents a Python slice.

Only c_long indeces supprted at the moment by PySlice object.

Methods

impl PySlice
[src]

[src]

Construct a new slice with the given elements.

[src]

Retrieve the start, stop, and step indices from the slice object slice assuming a sequence of length length, and store the length of the slice in slicelength.

Trait Implementations

impl AsRef<PyObjectRef> for PySlice
[src]

[src]

Performs the conversion.

impl PyObjectWithToken for PySlice
[src]

[src]

impl ToPyPointer for PySlice
[src]

[src]

Gets the underlying FFI pointer, returns a borrowed pointer.

impl PartialEq for PySlice
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PyTypeInfo for PySlice
[src]

Type of objects to store in PyObject struct

Base class

NAME: &'static str = "PySlice"

Class name

SIZE: usize = ::std::mem::size_of::<::ffi::PyObject>()

Size of the rust PyObject structure (PyObject + rust structure)

OFFSET: isize = 0

Type instance offset inside PyObject structure

[src]

PyTypeObject instance for this type

[src]

Check if *mut ffi::PyObject is instance of this type

DESCRIPTION: &'static str = "\u{0}"

Class doc string

FLAGS: usize = 0

Type flags (ie PY_TYPE_FLAG_GC, PY_TYPE_FLAG_WEAKREF)

[src]

Check if *mut ffi::PyObject is exact instance of this type

impl PyTypeObject for PySlice
[src]

[src]

Initialize type object

[src]

Retrieves the type object for this Python object type.

[src]

Create PyRawObject which can be initialized with rust value

impl ToPyObject for PySlice
[src]

[src]

Converts self into a Python object.

impl ToBorrowedObject for PySlice
[src]

[src]

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

impl Debug for PySlice
[src]

[src]

Formats the value using the given formatter.

impl Display for PySlice
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a> FromPyObject<'a> for &'a PySlice
[src]

[src]

Extracts Self from the source PyObject.