Enum plexus::buffer::BufferError
source · [−]pub enum BufferError {
IndexOutOfBounds,
IndexOverflow,
IndexUnaligned,
ArityConflict {
expected: usize,
actual: usize,
},
}
Expand description
Errors concerning raw buffers and MeshBuffer
s.
Variants
IndexOutOfBounds
An index into vertex data is out of bounds.
This error occurs when an index read from an index buffer is out of bounds of the vertex buffer it indexes.
IndexOverflow
The computation of an index causes an overflow.
This error occurs if the result of computing an index overflows the type
used to represent indices. For example, if the elements of an index
buffer are u8
s and an operation results in indices greater than
u8::MAX
, then this error will occur.
IndexUnaligned
The number of indices in a flat index buffer is incompatible with the arity of the buffer.
This error may occur if a flat index buffer contains a number of indices that is indivisible by the arity of the topology it represents. For example, this may error occur if a triangular index buffer contains a number of indices that is not divisible by three.
ArityConflict
The arity of a buffer or other data structure is not compatible with an operation.
Trait Implementations
sourceimpl Debug for BufferError
impl Debug for BufferError
sourceimpl Display for BufferError
impl Display for BufferError
sourceimpl Error for BufferError
impl Error for BufferError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<BufferError> for GraphError
impl From<BufferError> for GraphError
sourcefn from(error: BufferError) -> Self
fn from(error: BufferError) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<BufferError> for BufferError
impl PartialEq<BufferError> for BufferError
sourcefn eq(&self, other: &BufferError) -> bool
fn eq(&self, other: &BufferError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BufferError) -> bool
fn ne(&self, other: &BufferError) -> bool
This method tests for !=
.
impl StructuralPartialEq for BufferError
Auto Trait Implementations
impl RefUnwindSafe for BufferError
impl Send for BufferError
impl Sync for BufferError
impl Unpin for BufferError
impl UnwindSafe for BufferError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FromGeometry<T> for T
impl<T> FromGeometry<T> for T
fn from_geometry(other: T) -> T
sourceimpl<T, U> IntoGeometry<U> for T where
U: FromGeometry<T>,
impl<T, U> IntoGeometry<U> for T where
U: FromGeometry<T>,
fn into_geometry(self) -> U
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.