[][src]Struct ohm::factory::BufferPlan

pub struct BufferPlan {
    pub size: u64,
    pub usage: Usage,
    pub hint: Hint,
    pub required_flags: Properties,
    pub preferred_flags: Properties,
}

Buffer plan

Fields

size: u64usage: Usagehint: Hintrequired_flags: Propertiespreferred_flags: Properties

Methods

impl BufferPlan[src]

pub fn coherent(&mut self) -> &mut BufferPlan[src]

Create COHERENT buffer, if supported by the driver.

pub fn cached(&mut self) -> &mut BufferPlan[src]

Create CPU_CACHED buffer, if supported by the driver.

pub fn device_local(&mut self) -> &mut BufferPlan[src]

Create DEVICE_LOCAL buffer, if supported by the driver.

pub fn cpu_visible(&mut self) -> &mut BufferPlan[src]

Require a buffer to be CPU_VISIBLE.

pub fn permanent(&mut self) -> &mut BufferPlan[src]

Hint the allocator that the buffer will live for a long time.

By default, allocator assumes the buffer is a short-lived object.

pub fn create<B: Backend>(
    &self,
    factory: &mut Factory<B>
) -> Fallible<Buffer<B>>
[src]

Build the buffer, allocating the memory and binding it to the buffer.

Trait Implementations

impl Copy for BufferPlan[src]

impl PartialEq<BufferPlan> for BufferPlan[src]

impl Clone for BufferPlan[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for BufferPlan[src]

impl Debug for BufferPlan[src]

impl Hash for BufferPlan[src]

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

Auto Trait Implementations

impl Send for BufferPlan

impl Sync for BufferPlan

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> Supports for T[src]