[][src]Enum luminance::buffer::BufferError

#[non_exhaustive]pub enum BufferError {
    CannotCreate,
    Overflow {
        index: usize,
        buffer_len: usize,
    },
    TooFewValues {
        provided_len: usize,
        buffer_len: usize,
    },
    TooManyValues {
        provided_len: usize,
        buffer_len: usize,
    },
    MapFailed,
}

Buffer errors.

Please keep in mind that this enum is non exhaustive; you will not be able to exhaustively pattern-match against it.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CannotCreate

Cannot create buffer.

Overflow

Overflow when setting a value with a specific index.

Contains the index and the size of the buffer.

Fields of Overflow

index: usize

Tried index.

buffer_len: usize

Actuall buffer length.

TooFewValues

Too few values were passed to fill a buffer.

Contains the number of passed value and the size of the buffer.

Fields of TooFewValues

provided_len: usize

Length of the provided data.

buffer_len: usize

Actual buffer length.

TooManyValues

Too many values were passed to fill a buffer.

Contains the number of passed value and the size of the buffer.

Fields of TooManyValues

provided_len: usize

Length of the provided data.

buffer_len: usize

Actual buffer length.

MapFailed

Buffer mapping failed.

Implementations

impl BufferError[src]

pub fn cannot_create() -> Self[src]

Cannot create Buffer.

pub fn overflow(index: usize, buffer_len: usize) -> Self[src]

Overflow when setting a value with a specific index.

pub fn too_few_values(provided_len: usize, buffer_len: usize) -> Self[src]

Too few values were passed to fill a buffer.

pub fn too_many_values(provided_len: usize, buffer_len: usize) -> Self[src]

Too many values were passed to fill a buffer.

pub fn map_failed() -> Self[src]

Buffer mapping failed.

Trait Implementations

impl Debug for BufferError[src]

impl Display for BufferError[src]

impl Eq for BufferError[src]

impl Error for BufferError[src]

impl From<BufferError> for TessMapError[src]

impl From<BufferError> for TessError[src]

impl PartialEq<BufferError> for BufferError[src]

impl StructuralEq for BufferError[src]

impl StructuralPartialEq for BufferError[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.