MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / with_allocation

Method with_allocation

src/pglite/postgres_mod.rs:2898–2906  ·  view source on GitHub ↗
(
        &self,
        store: &mut Store,
        len: i32,
        f: impl FnOnce(&mut Store, i32) -> Result<R>,
    )

Source from the content-addressed store, hash-verified

2896 }
2897
2898 fn with_allocation<R>(
2899 &self,
2900 store: &mut Store,
2901 len: i32,
2902 f: impl FnOnce(&mut Store, i32) -> Result<R>,
2903 ) -> Result<R> {
2904 let ptr = self.allocate(store, len)?;
2905 self.run_and_free(store, ptr, f)
2906 }
2907
2908 fn allocate(&self, store: &mut Store, len: i32) -> Result<i32> {
2909 let ptr = self

Callers 1

take_outputMethod · 0.80

Calls 2

allocateMethod · 0.80
run_and_freeMethod · 0.80

Tested by

no test coverage detected