Enum colain::Error[][src]

pub enum Error {
    EmptyFile,
    NoHeader,
    HeaderInvalidUTF8,
    UnsupportedGeometryFormat,
    HeaderIncomplete(u8),
    InvalidHeaderValue,
    InvalidGeometryCommand(u16),
    ElementOutsideLayer,
    UnexpectedEOF,
    TypeMismatch,
}

Errors encountered when parsing a CLI file

Variants

EmptyFile

File is too short to contain a CLI file.

NoHeader

File does not contain a header section.

HeaderInvalidUTF8

Header does not contain valid UTF-8.

UnsupportedGeometryFormat

The header indicates that this file contains an ASCII encoded geometry section. This library does not support his format at this time.

HeaderIncomplete(u8)

Header is missing a required element:

  • 0: Indication of binary or ASCII geometry section
  • 1: Units
  • 2: Version
InvalidHeaderValue

A numeric header value could not be parsed.

InvalidGeometryCommand(u16)

One of 6 binary commands was expected in the next two bytes, instead, this value was found. Most likely the file is corrupted. It is possible the file contains commands not included in the CLI spec.

A bug in this library may also be present. Please consider submitting the .cli file in a PR. Thank you.

ElementOutsideLayer

The file in invalid because it has geometry elements in the geometry section before specifying the first layer.

UnexpectedEOF

An element in the geometry section indicated that more data was present but the EOF has been reached.

TypeMismatch

The CLIType specified when declaring the CLI parser does not match the data in the geometry section of the file.

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

Auto Trait Implementations

impl RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl UnwindSafe for Error

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.