[][src]Struct rendy_resource::buffer::Buffer

pub struct Buffer<B: Backend> { /* fields omitted */ }

Generic buffer object wrapper.

Parameters

T - type of the memory object of memory block. B - raw buffer type.

Methods

impl<B> Buffer<B> where
    B: Backend
[src]

pub fn keep_alive(&self) -> KeepAlive[src]

Creates KeepAlive handler to extend buffer lifetime.

pub fn visible(&self) -> bool[src]

Check if this buffer could is bound to CPU visible memory and therefore mappable. If this function returns false map will always return InvalidAccess.

pub fn map<'a>(
    &'a mut self,
    device: &B::Device,
    range: Range<u64>
) -> Result<MappedRange<'a, B>, Error>
[src]

Map range of the buffer to the CPU accessible memory.

pub fn raw(&self) -> &B::Buffer[src]

Get raw buffer handle.

Safety

Raw buffer handler should not be usage to violate this object valid usage.

pub fn info(&self) -> &Info[src]

Get buffer info.

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

Get buffer info.

Trait Implementations

impl<B: Debug + Backend> Debug for Buffer<B>[src]

Auto Trait Implementations

impl<B> Send for Buffer<B> where
    <B as Backend>::Buffer: Send + Sync

impl<B> Sync for Buffer<B> where
    <B as Backend>::Buffer: Send + Sync

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> Supports for T[src]

impl<T> Erased for T