Struct pgn_reader::Nag [−][src]
pub struct Nag(pub u8);Expand description
A numeric annotation glyph like ?, !! or $42.
Tuple Fields
0: u8Implementations
Tries to parse a NAG from ASCII.
Examples
use pgn_reader::Nag;
assert_eq!(Nag::from_ascii(b"??"), Ok(Nag(4)));
assert_eq!(Nag::from_ascii(b"$24"), Ok(Nag(24)));Errors
Returns an InvalidNag error if the input is neither a known glyph
(?!, !, …) nor a valid numeric annotation ($0, …, $255).
A brilliant move (!!).
A speculative move (!?).
A dubious move (?!).
Trait Implementations
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Nag
impl UnwindSafe for Nag
Blanket Implementations
Mutably borrows from an owned value. Read more