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§
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(),
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.