Struct vulkano::buffer::sys::UnsafeBuffer[][src]

pub struct UnsafeBuffer { /* fields omitted */ }

Data storage in a GPU-accessible location.

Implementations

impl UnsafeBuffer[src]

pub unsafe fn new<'a, I>(
    device: Arc<Device>,
    size: usize,
    usage: BufferUsage,
    sharing: Sharing<I>,
    sparse: Option<SparseLevel>
) -> Result<(UnsafeBuffer, MemoryRequirements), BufferCreationError> where
    I: Iterator<Item = u32>, 
[src]

Creates a new buffer of the given size.

See the module’s documentation for information about safety.

Panic

  • Panics if sparse.sparse is false and sparse.sparse_residency or sparse.sparse_aliased is true.
  • Panics if usage is empty.

pub unsafe fn bind_memory(
    &self,
    memory: &DeviceMemory,
    offset: usize
) -> Result<(), OomError>
[src]

Binds device memory to this buffer.

pub fn size(&self) -> usize[src]

Returns the size of the buffer in bytes.

pub fn usage(&self) -> BufferUsage[src]

Returns the buffer the image was created with.

pub fn key(&self) -> u64[src]

Returns a key unique to each UnsafeBuffer. Can be used for the conflicts_key method.

Trait Implementations

impl Debug for UnsafeBuffer[src]

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl DeviceOwned for UnsafeBuffer[src]

fn device(&self) -> &Arc<Device>[src]

Returns the device that owns Self.

impl Drop for UnsafeBuffer[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

impl Hash for UnsafeBuffer[src]

fn hash<H: Hasher>(&self, state: &mut H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl PartialEq<UnsafeBuffer> for UnsafeBuffer[src]

fn eq(&self, other: &Self) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl VulkanObject for UnsafeBuffer[src]

type Object = Buffer

The type of the object.

const TYPE: ObjectType[src]

The ObjectType of the internal Vulkan handle.

fn internal_object(&self) -> Buffer[src]

Returns a reference to the object.

impl Eq for UnsafeBuffer[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> Content for T[src]

pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>[src]

Builds a pointer to this type from a raw pointer.

pub fn is_size_suitable(usize) -> bool[src]

Returns true if the size is suitable to store a type like this.

pub fn indiv_size() -> usize[src]

Returns the size of an individual element.

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.