Enum tfm::pl::ParseWarningKind

source ·
pub enum ParseWarningKind {
Show 24 variants UnbalancedOpeningParenthesis { opening_parenthesis_span: Range<usize>, }, UnexpectedClosingParenthesis, JunkInsidePropertyList { junk: String, }, JunkAfterPropertyValue { junk: String, }, ParameterNumberIsTooBig, ParameterNumberIsZero, SmallIntegerIsTooBig { radix: u8, }, IntegerIsTooBig { radix: u8, }, DecimalNumberIsTooBig, InvalidPropertyName { provided_name: String, allowed_property_names: &'static [&'static str], }, InvalidPrefixForInteger { prefix: Option<char>, }, InvalidPrefixForSmallInteger, InvalidPrefixForDecimalNumber, InvalidOctalDigit { invalid_digit: char, }, EmptyCharacterValue, InvalidFaceCode, InvalidBoolean, HeaderIndexIsTooSmall, LigTableIsTooBig, CycleInLigKernProgram(InfiniteLoopError), CycleInNextLargerProgram(NextLargerProgramWarning), NotReallySevenBitSafe, DesignSizeIsTooSmall, NonVisibleAsciiCharacter { character: char, },
}
Expand description

Kind of parse warning.

Variants§

§

UnbalancedOpeningParenthesis

Fields

§opening_parenthesis_span: Range<usize>

The file contains an opening parenthesis that is not followed/balanced by a closing parenthesis.

§

UnexpectedClosingParenthesis

The file contains a closing parenthesis that is not preceded/balanced by an opening parenthesis.

§

JunkInsidePropertyList

Fields

§junk: String

There is some junk in the middle of a property list; e.g. (CHARWD D 9.0) junk (CHARDP D 8.0).

§

JunkAfterPropertyValue

Fields

§junk: String

There is some junk after a property value; e.g. (CHECKSUM O 123 junk).

§

ParameterNumberIsTooBig

A parameter number has value 255 which is too big.

Due to how pltotf processes numbers, parameter numbers larger than 255 are reported with ParseWarningKind::SmallIntegerIsTooBig and ParseWarningKind::ParameterNumberIsZero warnings.

§

ParameterNumberIsZero

A parameter number has value 0 which is invalid as parameter numbers must be strictly positive.

§

SmallIntegerIsTooBig

Fields

§radix: u8

A small integer is bigger than 255.

§

IntegerIsTooBig

Fields

§radix: u8

An integer is bigger than 255^4.

§

DecimalNumberIsTooBig

A decimal number is bigger than 2048 in absolute value.

§

InvalidPropertyName

Fields

§provided_name: String

The name that was provided.

§allowed_property_names: &'static [&'static str]

Names that are allowed in this position.

A property name is invalid.

§

InvalidPrefixForInteger

Fields

§prefix: Option<char>

Invalid prefix for an integer.

§

InvalidPrefixForSmallInteger

Invalid prefix for a small integer.

§

InvalidPrefixForDecimalNumber

Invalid prefix for a decimal number.

§

InvalidOctalDigit

Fields

§invalid_digit: char

Invalid octal digit.

§

EmptyCharacterValue

No character value is provided.

§

InvalidFaceCode

Invalid face code

§

InvalidBoolean

Invalid boolean value.

§

HeaderIndexIsTooSmall

A header index is smaller than 18

§

LigTableIsTooBig

The lig table is too big (todo: larger than what?)

§

CycleInLigKernProgram(InfiniteLoopError)

The lig/kern program contains a cycle

§

CycleInNextLargerProgram(NextLargerProgramWarning)

The next larger program contains a cycle

§

NotReallySevenBitSafe

The file is really seven bit safe, even though it says it is

§

DesignSizeIsTooSmall

The design size is less than 1.

§

NonVisibleAsciiCharacter

Fields

§character: char

The file contains a non-visible ASCII character.

Trait Implementations§

source§

impl Clone for ParseWarningKind

source§

fn clone(&self) -> ParseWarningKind

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 ParseWarningKind

source§

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

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

impl PartialEq<ParseWarningKind> for ParseWarningKind

source§

fn eq(&self, other: &ParseWarningKind) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for ParseWarningKind

source§

impl StructuralEq for ParseWarningKind

source§

impl StructuralPartialEq for ParseWarningKind

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere 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, U> TryFrom<U> for Twhere 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 Twhere 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.