[−][src]Struct rendy_resource::buffer::Buffer
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]
B: Backend,
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]
&'a mut self,
device: &B::Device,
range: Range<u64>
) -> Result<MappedRange<'a, B>, Error>
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
Auto Trait Implementations
impl<B> Send for Buffer<B> where
<B as Backend>::Buffer: Send + Sync,
<B as Backend>::Buffer: Send + Sync,
impl<B> Sync for Buffer<B> where
<B as Backend>::Buffer: Send + Sync,
<B as Backend>::Buffer: Send + Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,