[][src]Trait rustpython_vm::obj::objsequence::PySliceableSequence

pub trait PySliceableSequence {
    type Sliced;
    fn do_slice(&self, range: Range<usize>) -> Self::Sliced;
fn do_slice_reverse(&self, range: Range<usize>) -> Self::Sliced;
fn do_stepped_slice(&self, range: Range<usize>, step: usize) -> Self::Sliced;
fn do_stepped_slice_reverse(
        &self,
        range: Range<usize>,
        step: usize
    ) -> Self::Sliced;
fn empty() -> Self::Sliced;
fn len(&self) -> usize;
fn is_empty(&self) -> bool; fn get_pos(&self, p: i32) -> Option<usize> { ... }
fn get_slice_pos(&self, slice_pos: &BigInt) -> usize { ... }
fn get_slice_range(
        &self,
        start: &Option<BigInt>,
        stop: &Option<BigInt>
    ) -> Range<usize> { ... }
fn get_slice_items(
        &self,
        vm: &VirtualMachine,
        slice: &PyObjectRef
    ) -> PyResult<Self::Sliced>
    where
        Self: Sized
, { ... } }

Associated Types

type Sliced

Loading content...

Required methods

fn do_slice(&self, range: Range<usize>) -> Self::Sliced

fn do_slice_reverse(&self, range: Range<usize>) -> Self::Sliced

fn do_stepped_slice(&self, range: Range<usize>, step: usize) -> Self::Sliced

fn do_stepped_slice_reverse(
    &self,
    range: Range<usize>,
    step: usize
) -> Self::Sliced

fn empty() -> Self::Sliced

fn len(&self) -> usize

fn is_empty(&self) -> bool

Loading content...

Provided methods

fn get_pos(&self, p: i32) -> Option<usize>

fn get_slice_pos(&self, slice_pos: &BigInt) -> usize

fn get_slice_range(
    &self,
    start: &Option<BigInt>,
    stop: &Option<BigInt>
) -> Range<usize>

fn get_slice_items(
    &self,
    vm: &VirtualMachine,
    slice: &PyObjectRef
) -> PyResult<Self::Sliced> where
    Self: Sized

Loading content...

Implementations on Foreign Types

impl<T: Clone> PySliceableSequence for Vec<T>[src]

type Sliced = Vec<T>

impl PySliceableSequence for String[src]

type Sliced = String

Loading content...

Implementors

Loading content...