pub trait PyBufferRequestType: Sealed {
type WithFormat: PyBufferRequestType + IncludesFormat;
type WithShape: PyBufferRequestType + IncludesShape;
type WithStrides: PyBufferRequestType + IncludesShape + IncludesStrides;
type WithIndirect: PyBufferRequestType + IncludesShape + IncludesStrides + IncludesSuboffsets;
type WithWritable: PyBufferRequestType;
type WithCContiguous: PyBufferRequestType;
type WithFContiguous: PyBufferRequestType;
type WithAnyContiguous: PyBufferRequestType;
const IS_SIMPLE: bool;
const CONTIGUITY: PyBufferContiguity;
const WRITABLE: bool;
}Available on
Py_3_11 or non-Py_LIMITED_API only.Expand description
Trait implemented by all hidden super::PyBufferRequest states.
Required Associated Constants§
Sourceconst IS_SIMPLE: bool
const IS_SIMPLE: bool
Whether this is a simple request, which treats the buffer as unsigned bytes.
Sourceconst CONTIGUITY: PyBufferContiguity
const CONTIGUITY: PyBufferContiguity
The contiguity requirement encoded by these flags.
Required Associated Types§
Sourcetype WithFormat: PyBufferRequestType + IncludesFormat
type WithFormat: PyBufferRequestType + IncludesFormat
The state after requesting format information.
Sourcetype WithShape: PyBufferRequestType + IncludesShape
type WithShape: PyBufferRequestType + IncludesShape
The state after requesting shape information.
Sourcetype WithStrides: PyBufferRequestType + IncludesShape + IncludesStrides
type WithStrides: PyBufferRequestType + IncludesShape + IncludesStrides
The state after requesting strides information.
Sourcetype WithIndirect: PyBufferRequestType + IncludesShape + IncludesStrides + IncludesSuboffsets
type WithIndirect: PyBufferRequestType + IncludesShape + IncludesStrides + IncludesSuboffsets
The state after requesting indirect / suboffset information.
Sourcetype WithWritable: PyBufferRequestType
type WithWritable: PyBufferRequestType
The state after requesting writability.
Sourcetype WithCContiguous: PyBufferRequestType
type WithCContiguous: PyBufferRequestType
The state after requesting C contiguity.
Sourcetype WithFContiguous: PyBufferRequestType
type WithFContiguous: PyBufferRequestType
The state after requesting Fortran contiguity.
Sourcetype WithAnyContiguous: PyBufferRequestType
type WithAnyContiguous: PyBufferRequestType
The state after requesting either C or Fortran contiguity.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".