Enum norad::error::ErrorKind

source ·
pub enum ErrorKind {
Show 40 variants UnsupportedGlifVersion, UnknownPointType, WrongFirstElement, MissingCloseTag, BadHexValue, BadNumber, BadColor, BadAnchor, BadPoint, BadGuideline, BadComponent, BadImage, BadIdentifier, InvalidName, BadLib, UnexpectedDuplicate, UnexpectedMove, UnexpectedSmooth, UnexpectedElement, UnexpectedAttribute, UnexpectedEof, UnexpectedPointAfterOffCurve, TooManyOffCurves, PenPathNotStarted, TrailingOffCurves, DuplicateIdentifier, UnexpectedDrawing, UnfinishedDrawing, UnexpectedPointField, UnexpectedComponentField, UnexpectedAnchorField, UnexpectedGuidelineField, UnexpectedImageField, DuplicateElement(&'static str), UnexpectedV1Element(&'static str), UnexpectedV1Attribute(&'static str), ComponentEmptyBase, ComponentMissingBase, LibMustBeDictionary, BadAngle,
}
Expand description

The reason for a glif parse failure.

Variants§

§

UnsupportedGlifVersion

The glif version is not supported by this library.

§

UnknownPointType

An unknown point type.

§

WrongFirstElement

The first XML element of a glif file is invalid.

§

MissingCloseTag

Missing a close tag.

§

BadHexValue

Has an invalid hexadecimal value.

§

BadNumber

Has an invalid numeric value.

§

BadColor

Has an invalid color value.

§

BadAnchor

Has an invalid anchor definition.

§

BadPoint

Has an invalid point definition.

§

BadGuideline

Has an invalid guideline definition.

§

BadComponent

Has an invalid component definition.

§

BadImage

Has an invalid image definition.

§

BadIdentifier

Has an invalid identifier.

§

InvalidName

Name is not a valid Name.

§

BadLib

Has an invalid lib.

§

UnexpectedDuplicate

Has an unexected duplicate value.

§

UnexpectedMove

Has an unexpected move definition.

§

UnexpectedSmooth

Has an unexpected smooth definition.

§

UnexpectedElement

Has an unexpected element definition.

§

UnexpectedAttribute

Has an unexpected attribute definition.

§

UnexpectedEof

Has an unexpected end of file definition.

§

UnexpectedPointAfterOffCurve

Has an unexpected point following an off curve point definition.

§

TooManyOffCurves

Has too many off curve points in sequence.

§

PenPathNotStarted

The contour pen path was not started

§

TrailingOffCurves

Has trailing off curve points defined.

§

DuplicateIdentifier

Has duplicate identifiers.

§

UnexpectedDrawing

Has unexepected drawing data.

§

UnfinishedDrawing

Has incomplete drawing data.

§

UnexpectedPointField

Has an unexpected point field.

§

UnexpectedComponentField

Has an unexpected component field.

§

UnexpectedAnchorField

Has an unexpected anchor field.

§

UnexpectedGuidelineField

Has an unexpected guideline field.

§

UnexpectedImageField

Has an unexpected image field.

§

DuplicateElement(&'static str)

An element that can occur just once occured a second time.

§

UnexpectedV1Element(&'static str)

An element that can occur just once occured a second time.

§

UnexpectedV1Attribute(&'static str)

An element that can occur just once occured a second time.

§

ComponentEmptyBase

A component had an empty base attribute.

§

ComponentMissingBase

A component was missing a base attribute.

§

LibMustBeDictionary

The glyph ‘lib’ element must contain a dictionary.

§

BadAngle

An angle was out of bounds.

Trait Implementations§

source§

impl Clone for ErrorKind

source§

fn clone(&self) -> ErrorKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ErrorKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ErrorKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for ErrorKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.