Struct glium_typed_buffer_any::TypedVertexBufferAny [−][src]
A type-erased VertexBuffer
which can be safely borrowed as the original VertexBuffer<T>
using a dynamic type check.
Implementations
impl TypedVertexBufferAny
[src]
pub fn as_typed_slice<T: Vertex + Send + 'static>(
&self
) -> Result<BufferSlice<'_, [T]>, IncorrectTypeError>
[src]
&self
) -> Result<BufferSlice<'_, [T]>, IncorrectTypeError>
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]
&mut self
) -> Result<BufferMutSlice<'_, [T]>, IncorrectTypeError>
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<T> From<VertexBuffer<T>> for TypedVertexBufferAny where
T: Vertex + Send + 'static,
[src]
T: Vertex + Send + 'static,
fn from(buffer: VertexBuffer<T>) -> TypedVertexBufferAny
[src]
impl<'a> Into<VerticesSource<'a>> for &'a TypedVertexBufferAny
[src]
fn into(self) -> VerticesSource<'a>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for TypedVertexBufferAny
impl !Send for TypedVertexBufferAny
impl !Sync for TypedVertexBufferAny
impl Unpin for TypedVertexBufferAny
impl !UnwindSafe for TypedVertexBufferAny
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,