Trait MutObjectSequenceOp

Source
pub trait MutObjectSequenceOp {
    type Inner: ?Sized;

    // Required methods
    fn do_get(index: usize, inner: &Self::Inner) -> Option<&PyObjectRef>;
    fn do_lock(&self) -> impl Deref<Target = Self::Inner>;

    // Provided methods
    fn mut_count(
        &self,
        vm: &VirtualMachine,
        needle: &PyObject,
    ) -> PyResult<usize> { ... }
    fn mut_index_range(
        &self,
        vm: &VirtualMachine,
        needle: &PyObject,
        range: Range<usize>,
    ) -> PyResult<Optioned<usize>> { ... }
    fn mut_index(
        &self,
        vm: &VirtualMachine,
        needle: &PyObject,
    ) -> PyResult<Optioned<usize>> { ... }
    fn mut_contains(
        &self,
        vm: &VirtualMachine,
        needle: &PyObject,
    ) -> PyResult<bool> { ... }
    fn _mut_iter_equal_skeleton<F, const SHORT: bool>(
        &self,
        vm: &VirtualMachine,
        needle: &PyObject,
        range: Range<usize>,
        f: F,
    ) -> PyResult<Optioned<usize>>
       where F: FnMut() { ... }
}

Required Associated Types§

Required Methods§

Source

fn do_get(index: usize, inner: &Self::Inner) -> Option<&PyObjectRef>

Source

fn do_lock(&self) -> impl Deref<Target = Self::Inner>

Provided Methods§

Source

fn mut_count(&self, vm: &VirtualMachine, needle: &PyObject) -> PyResult<usize>

Source

fn mut_index_range( &self, vm: &VirtualMachine, needle: &PyObject, range: Range<usize>, ) -> PyResult<Optioned<usize>>

Source

fn mut_index( &self, vm: &VirtualMachine, needle: &PyObject, ) -> PyResult<Optioned<usize>>

Source

fn mut_contains(&self, vm: &VirtualMachine, needle: &PyObject) -> PyResult<bool>

Source

fn _mut_iter_equal_skeleton<F, const SHORT: bool>( &self, vm: &VirtualMachine, needle: &PyObject, range: Range<usize>, f: F, ) -> PyResult<Optioned<usize>>
where F: FnMut(),

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§