Enum atoi::Sign [] [src]

pub enum Sign {
    Plus,
    Minus,
}

Representation of a numerical sign

Variants

Methods

impl Sign
[src]

[src]

Trys to convert an ascii character into a Sign

Example

use atoi::Sign;
assert_eq!(Some(Sign::Plus), Sign::try_from(b'+'));
assert_eq!(Some(Sign::Minus), Sign::try_from(b'-'));
assert_eq!(None, Sign::try_from(b'1'));

[src]

Returns either +1 or -1

Trait Implementations

impl Clone for Sign
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Sign
[src]

impl Debug for Sign
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for Sign
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for Sign
[src]

Auto Trait Implementations

impl Send for Sign

impl Sync for Sign