Enum wgpu_core::resource::BufferMapAsyncStatus
source · #[repr(C)]
pub enum BufferMapAsyncStatus {
Success,
AlreadyMapped,
MapAlreadyPending,
Error,
Aborted,
ContextLost,
Invalid,
InvalidRange,
InvalidAlignment,
InvalidUsageFlags,
}
Expand description
The status code provided to the buffer mapping callback.
This is very similar to Result<(), BufferAccessError>
, except that this is FFI-friendly.
Variants§
Success
The Buffer is sucessfully mapped, get_mapped_range
can be called.
All other variants of this enum represent failures to map the buffer.
AlreadyMapped
The buffer is already mapped.
While this is treated as an error, it does not prevent mapped range from being accessed.
MapAlreadyPending
Mapping was already requested.
Error
An unknown error.
Aborted
Mapping was aborted (by unmapping or destroying the buffer before mapping happened).
ContextLost
The context is Lost.
Invalid
The buffer is in an invalid state.
InvalidRange
The range isn’t fully contained in the buffer.
InvalidAlignment
The range isn’t properly aligned.
InvalidUsageFlags
Incompatible usage flags.