Enum shiratsu_naming::naming::tosec::TOSECWarn[][src]

pub enum TOSECWarn<'a> {
    ZZZUnknown,
    MalformedDatePlaceholder(&'a str),
    MalformedDevelopmentStatus(&'a str),
    UndelimitedDate(&'a str),
    MissingDate,
    MissingPublisher,
    MissingSpace,
    UnexpectedSpace,
    ByPublisher,
    PublisherBeforeDate,
    GoodToolsRegionCode(&'a str),
    VersionInFlag,
    NotEof(&'a str),
}

A token that represents a warning or inconsistency in a TOSEC Naming Convention file name.

Warnings may be lexical (and are emitted in the input stream), or non-lexical, which serves as a warning.

Warnings may modify how a token is re-serialized depending on the order they appear in the TOSECName. A warning always occurs before the associated token.

Variants

ZZZUnknown

This file name starts with ZZZ-UNK-.

This warning is lexical and will emit the string ZZZ-UNK-

MalformedDatePlaceholder(&'a str)

The date placeholder in the following date token is malformed, often because it is upper cased.

A date such as 19XX will produce this warning.

If multiple date segments are malformed, multiple warnings will be emitted in the order year, month, date.

This warning is non-lexical.

MalformedDevelopmentStatus(&'a str)

The development status flag in the following development status token is malformed, often because it is upper cased.

A development status such as Beta will produce this warning.

This warning is non-lexical.

UndelimitedDate(&'a str)

The following date token is undelimited with hyphens.

A date such as 20001231 will produce this warning.

This warning is lexical and will modify the re-serialization of the following date token. This warning always occurs after all MalformedDatePlaceholder warnings.

MissingDate

The required date token is missing.

This warning is non-lexical.

MissingPublisher

The required publisher token is missing.

This warning is non-lexical.

MissingSpace

A space was expected between the preceding and following token of this warning.

This warning is lexical and will ensure that there are no spaces between the preceding and following non-warning token.

UnexpectedSpace

A space occurred between the preceding and following token of this warning.

This warning is lexical and will ensure that a space occurs between the preceding and following non-warning token.

ByPublisher

The following publisher token is preceded by the string ‘by’.

This may occur in ZZZ-UNK- names such as ZZZ-UNK-Micro Font Dumper by Schick, Bastian.

This warning is lexical and will emit the string by .

PublisherBeforeDate

The publisher flag occurred before the date flag.

This often occurs if a ByPublisher warning is emitted. If so, this token is always emitted before ByPublisher is emitted.

This warning is non-lexical.

GoodToolsRegionCode(&'a str)

A GoodTool region code occurred rather than an ISO region.

This warning is non-lexical, however the following region token will contain the GoodTools region string, and not a valid TOSEC ISO region string.

TOSECName::into_strict() will transform GoodTools region tokens into ISO region string tokens.

VersionInFlag

A version occurred wrap in parentheses as a flag.

This warning is lexical and will cause the following version token to be emitted within parentheses.

NotEof(&'a str)

When parsing a TOSEC name, the name is expected to be complete.

If not, then this warning will be emitted containing the remainder of the string. This often occurs because of unbalanced parentheses or braces.

If this warning is emitted, it should be the last token in the token string, and thus have no associated token.

This warning is lexical and will emit the remainder string segment. This can be removed with TOSECName::without_trailing.

Trait Implementations

impl<'a> Clone for TOSECWarn<'a>[src]

impl<'a> Debug for TOSECWarn<'a>[src]

impl<'a> Eq for TOSECWarn<'a>[src]

impl<'a> Ord for TOSECWarn<'a>[src]

impl<'a> PartialEq<TOSECWarn<'a>> for TOSECWarn<'a>[src]

impl<'a> PartialOrd<TOSECWarn<'a>> for TOSECWarn<'a>[src]

impl<'a> StructuralEq for TOSECWarn<'a>[src]

impl<'a> StructuralPartialEq for TOSECWarn<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for TOSECWarn<'a>

impl<'a> Send for TOSECWarn<'a>

impl<'a> Sync for TOSECWarn<'a>

impl<'a> Unpin for TOSECWarn<'a>

impl<'a> UnwindSafe for TOSECWarn<'a>

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> Conv for T

impl<T> Conv for T

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> FmtForward for T

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

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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.