MCPcopy Create free account
hub / github.com/0x676e67/wreq-python / into_bytes

Method into_bytes

src/buffer.rs:32–35  ·  view source on GitHub ↗

Consume self to build a bytes

(self, py: Python<'py>)

Source from the content-addressed store, hash-verified

30
31 /// Consume self to build a bytes
32 fn into_bytes(self, py: Python<'py>) -> PyResult<Py<PyAny>> {
33 let buffer = self.into_py_any(py)?;
34 unsafe { PyObject::from_owned_ptr_or_err(py, ffi::PyBytes_FromObject(buffer.as_ptr())) }
35 }
36
37 /// Consume self to build a bytes
38 fn into_bytes_ref(self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>> {

Callers 3

bytesMethod · 0.80
bytesMethod · 0.80
_anextMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected