pub enum TOSECWarn<'a> {
}
Expand description
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§
Source§impl<'a> Ord for TOSECWarn<'a>
impl<'a> Ord for TOSECWarn<'a>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<'a> PartialOrd for TOSECWarn<'a>
impl<'a> PartialOrd for TOSECWarn<'a>
impl<'a> Eq for TOSECWarn<'a>
impl<'a> StructuralPartialEq for TOSECWarn<'a>
Auto Trait Implementations§
impl<'a> Freeze for TOSECWarn<'a>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.