MCPcopy Index your code
hub / github.com/RustPython/RustPython / try_resizable

Method try_resizable

crates/vm/src/protocol/buffer.rs:402–406  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

400 Self: 'a;
401 fn try_resizable_opt(&self) -> Option<Self::Resizable<'_>>;
402 fn try_resizable(&self, vm: &VirtualMachine) -> PyResult<Self::Resizable<'_>> {
403 self.try_resizable_opt().ok_or_else(|| {
404 vm.new_buffer_error("Existing exports of data: object cannot be re-sized")
405 })
406 }
407}
408
409#[pyclass(module = false, name = "vec_buffer")]

Callers 15

appendMethod · 0.80
clearMethod · 0.80
removeMethod · 0.80
extendMethod · 0.80
fromunicodeMethod · 0.80
_from_bytesMethod · 0.80
insertMethod · 0.80
popMethod · 0.80
fromlistMethod · 0.80
setitem_innerMethod · 0.80
delitem_innerMethod · 0.80
__iadd__Method · 0.80

Implementers 3

array.rscrates/stdlib/src/array.rs
_io.rscrates/vm/src/stdlib/_io.rs
bytearray.rscrates/vm/src/builtins/bytearray.rs

Calls 2

ok_or_elseMethod · 0.80
try_resizable_optMethod · 0.45

Tested by

no test coverage detected