Skip to main content

AsBuffer

Trait AsBuffer 

Source
pub trait AsBuffer: PyPayload {
    const RELEASE_BUFFER: bool = false;
    const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _;

    // Required method
    fn as_buffer(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyBuffer>;

    // Provided methods
    fn slot_as_buffer(
        zelf: &PyObject,
        flags: BufferFlags,
        vm: &VirtualMachine,
    ) -> PyResult<PyBuffer> { ... }
    fn __extend_py_class(ctx: &'static Context, class: &'static Py<PyType>) { ... }
    fn __extend_slots(slots: &mut PyTypeSlots) { ... }
}

Provided Associated Constants§

Source

const RELEASE_BUFFER: bool = false

bf_releasebuffer: set when releasing an export of this type is observable, i.e. the exporter counts exports. Such types expose __release_buffer__.

Source

const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _

Required Methods§

Provided Methods§

Source

fn slot_as_buffer( zelf: &PyObject, flags: BufferFlags, vm: &VirtualMachine, ) -> PyResult<PyBuffer>

Source

fn __extend_py_class(ctx: &'static Context, class: &'static Py<PyType>)

Source

fn __extend_slots(slots: &mut PyTypeSlots)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§