Available on
Py_3_11 or non-Py_LIMITED_API only.Expand description
PyBuffer implementation
Re-exportsยง
use crate::inspect::PyStaticExpr;๐experimental-inspectuse crate::inspect::type_hint_identifier;๐experimental-inspectuse crate::Borrowed;๐use crate::Bound;๐use crate::PyErr;๐use crate::FromPyObject;๐use crate::FromPyObject;๐use crate::PyAny;๐use crate::PyResult;๐use crate::Python;๐use crate::err;๐use crate::exceptions::PyBufferError;๐use crate::ffi;๐use core::ffi::c_char;๐use core::ffi::c_int;๐use core::ffi::c_long;๐use core::ffi::c_longlong;๐use core::ffi::c_schar;๐use core::ffi::c_short;๐use core::ffi::c_uchar;๐use core::ffi::c_uint;๐use core::ffi::c_ulong;๐use core::ffi::c_ulonglong;๐use core::ffi::c_ushort;๐use core::ffi::c_void;๐use core::marker::PhantomData;๐use core::marker::PhantomPinned;๐use core::pin::Pin;๐use core::ptr::NonNull;๐use core::cell;๐use core::mem;๐use core::ptr;๐use core::slice;๐use core::ffi::CStr;๐use core::fmt::Debug;๐use core::fmt::Debug;๐use self::flags::CONTIGUITY_C;๐use self::flags::CONTIGUITY_UNDEFINED;๐use self::flags::PyBufferFlags as RequestFlags;๐use self::flags::PyBufferRequestType;๐use crate::platform::prelude::*;๐
Modulesยง
- flags ๐
Macrosยง
- impl_
element ๐
Structsยง
- Buffer
View ๐Guard - Drops an initialized view in place, including when the callback panics. The viewโs storage is a MaybeUninit, so it will not be dropped a second time.
- PyBuffer
- A typed form of
PyUntypedBuffer. - PyBuffer
Request - Type-safe buffer request. The state parameter is intentionally hidden behind this wrapper so the internal encoding can evolve.
- PyBuffer
View - A typed form of
PyUntypedBufferView. Not constructible directly โ usePyBufferView::with()orPyBufferView::with_flags(). - PyUntyped
Buffer - Allows access to the underlying buffer used by a python object such as
bytes,bytearrayorarray.array. - PyUntyped
Buffer View - Stack-allocated untyped buffer view.
- RawBuffer ๐
- Wrapper around
ffi::Py_bufferto be!Unpin. - Read
Only Cell - Like core::cell::Cell, but only provides read-only access to the data.
Enumsยง
- Element
Type - Represents the type of a Python buffer element.
- PyBuffer
Contiguity - Contiguity constraint encoded by a
PyBufferRequest.
Traitsยง
- Element
- Trait implemented for possible element types of
PyBuffer.
Functionsยง
- check_
buffer_ ๐compatibility - Check that a buffer is compatible with element type
T. - debug_
buffer ๐ - is_
matching_ ๐endian Little-endian - native_
element_ ๐type_ from_ type_ char - standard_
element_ ๐type_ from_ type_ char