# pyo3::class::buffer::PyBufferProtocol - Rust
Buffer protocol interface
Keywords: rust, rustlang, rust-lang, PyBufferProtocol

# Trait pyo3::class::buffer::PyBufferProtocol [−] [src]

    pub trait PyBufferProtocol<'p>: PyClass {
        fn bf_getbuffer(
            slf: PyRefMut<'_, Self>,
            view: *mut Py_buffer,
            flags: c_int
        ) -> Self::Result
        where
            Self: PyBufferGetBufferProtocol<'p>;
        fn bf_releasebuffer(
            slf: PyRefMut<'_, Self>,
            view: *mut Py_buffer
        ) -> Self::Result
        where
            Self: PyBufferReleaseBufferProtocol<'p>;
    }

Buffer protocol interface

For more information check buffer protocol c-api.

## Required methods

### `fn bf_getbuffer(
slf: PyRefMut<'_, Self>,
view: *mut Py_buffer,
flags: c_int
) -> Self::Result where
Self: PyBufferGetBufferProtocol<'p>,` [src]

### `fn bf_releasebuffer(
slf: PyRefMut<'_, Self>,
view: *mut Py_buffer
) -> Self::Result where
Self: PyBufferReleaseBufferProtocol<'p>,` [src]

Loading content...

## Implementors

Loading content...