Struct ascii::AsciiStr [] [src]

pub struct AsciiStr {
    // some fields omitted
}

Methods

impl AsciiStr
[src]

fn new<S: AsRef<AsciiStr> + ?Sized>(s: &S) -> &AsciiStr

fn as_str(&self) -> &str

fn to_ascii_string(&self) -> AsciiString

fn as_bytes(&self) -> &[u8]

fn from_bytes<'a, B: ?Sized>(bytes: &'a B) -> Option<&'a AsciiStr> where B: AsRef<[u8]>

fn from_str<'a>(s: &'a str) -> Option<&'a AsciiStr>

fn len(&self) -> usize

Trait Implementations

impl Hash for AsciiStr
[src]

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl PartialEq for AsciiStr
[src]

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

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

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

This method tests for !=.

impl Eq for AsciiStr
[src]

impl PartialOrd for AsciiStr
[src]

fn partial_cmp(&self, other: &AsciiStr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more

fn lt(&self, other: &AsciiStr) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more

fn le(&self, other: &AsciiStr) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn gt(&self, other: &AsciiStr) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more

fn ge(&self, other: &AsciiStr) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for AsciiStr
[src]

fn cmp(&self, other: &AsciiStr) -> Ordering

This method returns an Ordering between self and other. Read more

impl ToOwned for AsciiStr
[src]

type Owned = AsciiString

fn to_owned(&self) -> AsciiString

Creates owned data from borrowed data, usually by cloning. Read more

impl AsRef<[u8]> for AsciiStr
[src]

fn as_ref(&self) -> &[u8]

Performs the conversion.

impl AsRef<str> for AsciiStr
[src]

fn as_ref(&self) -> &str

Performs the conversion.

impl Display for AsciiStr
[src]

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

Formats the value using the given formatter.

impl Debug for AsciiStr
[src]

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

Formats the value using the given formatter.

impl<'a> PartialEq<String> for &'a AsciiStr
[src]

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

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

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

This method tests for !=.

impl<'a> PartialEq<AsciiString> for &'a AsciiStr
[src]

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

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

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

This method tests for !=.

impl PartialEq<str> for AsciiStr
[src]

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

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

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

This method tests for !=.