Struct gfx::device::handle::Buffer [] [src]

pub struct Buffer<R: Resources, T> {
    // some fields omitted
}

Type-safe buffer handle

Methods

impl<R: Resources, T> Buffer<R, T>

fn from_raw(handle: RawBuffer<R>) -> Buffer<R, T>

Create a type-safe Buffer from a RawBuffer

fn cast<U>(self) -> Buffer<R, U>

Cast the type this Buffer references

fn raw(&self) -> &RawBuffer<R>

Get the underlying raw Handle

fn get_info(&self) -> &BufferInfo

Get the associated information about the buffer

fn len(&self) -> usize

Get the number of elements in the buffer.

Fails if T is zero-sized.

Trait Implementations

Derived Implementations

impl<R: PartialEq + Resources, T: PartialEq> PartialEq for Buffer<R, T> where R: PartialEq, T: PartialEq

fn eq(&self, __arg_0: &Buffer<R, T>) -> bool

fn ne(&self, __arg_0: &Buffer<R, T>) -> bool

impl<R: Hash + Resources, T: Hash> Hash for Buffer<R, T> where R: Hash, T: Hash

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

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

impl<R: Debug + Resources, T: Debug> Debug for Buffer<R, T> where R: Debug, T: Debug

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl<R: Clone + Resources, T: Clone> Clone for Buffer<R, T> where R: Clone, T: Clone

fn clone(&self) -> Buffer<R, T>

fn clone_from(&mut self, source: &Self)