pub trait Vertex: Copy + Sized {
// Required method
fn build_bindings() -> VertexFormat;
// Provided method
fn is_supported<C>(caps: &C) -> bool
where C: CapabilitiesSource + ?Sized { ... }
}
Expand description
Trait for structures that represent a vertex.
Instead of implementing this trait yourself, it is recommended to use the implement_vertex!
macro instead.
Required Methods§
sourcefn build_bindings() -> VertexFormat
fn build_bindings() -> VertexFormat
Builds the VertexFormat
representing the layout of this element.
Provided Methods§
sourcefn is_supported<C>(caps: &C) -> boolwhere
C: CapabilitiesSource + ?Sized,
fn is_supported<C>(caps: &C) -> boolwhere C: CapabilitiesSource + ?Sized,
Returns true if the backend supports this vertex format.