(
&self,
options: ByteInnerFindOptions,
find: F,
vm: &VirtualMachine,
)
| 552 | |
| 553 | #[inline] |
| 554 | pub fn find<F>( |
| 555 | &self, |
| 556 | options: ByteInnerFindOptions, |
| 557 | find: F, |
| 558 | vm: &VirtualMachine, |
| 559 | ) -> PyResult<Option<usize>> |
| 560 | where |
| 561 | F: Fn(&[u8], &[u8]) -> Option<usize>, |
| 562 | { |
| 563 | let (needle, range) = options.get_value(self.elements.len(), vm)?; |
| 564 | Ok(self.elements.py_find(&needle, range, find)) |
| 565 | } |
| 566 | |
| 567 | pub fn maketrans(from: Self, to: Self, vm: &VirtualMachine) -> PyResult<Vec<u8>> { |
| 568 | if from.len() != to.len() { |
no test coverage detected