[][src]Struct glium_typed_buffer_any::TypedVertexBufferAny

pub struct TypedVertexBufferAny { /* fields omitted */ }

A type-erased VertexBuffer which can be safely borrowed as the original VertexBuffer<T> using a dynamic type check.

Methods

impl TypedVertexBufferAny[src]

pub fn as_typed_slice<T: Vertex + Send + 'static>(
    &self
) -> Result<BufferSlice<[T]>, IncorrectTypeError>
[src]

Borrows buffer immutably as typed, checking the type at runtime.

Returns an error if the type is not the one given on construction.

pub fn as_typed_slice_mut<T: Vertex + Send + 'static>(
    &mut self
) -> Result<BufferMutSlice<[T]>, IncorrectTypeError>
[src]

Borrows the buffer mutably as typed, checking the type at runtime.

Returns an error if the type is not the one given on construction.

Trait Implementations

impl<'a> Into<VerticesSource<'a>> for &'a TypedVertexBufferAny[src]

impl<T> From<VertexBuffer<T>> for TypedVertexBufferAny where
    T: Vertex + Send + 'static, 
[src]

Auto Trait Implementations

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 = Infallible

The type returned in the event of a conversion error.

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

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

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

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> Erased for T