Struct multistr::pair::StringPair
[−]
[src]
pub struct StringPair { /* fields omitted */ }
Immutable pair of strings stored on the heap in the same buffer.
Methods
impl StringPair
[src]
fn new<S1: Into<String>, S2: AsRef<str>>(s1: S1, s2: S2) -> StringPair
Creates a StringPair
from a pair of strings.
fn from_raw<S: Into<String>>(string: S, split: usize) -> StringPair
Creates a StringPair
from a string and split index.
unsafe fn from_raw_unchecked<S: Into<String>>(string: S,
split: usize)
-> StringPair
split: usize)
-> StringPair
Creates a StringPair
from a string and split index without checking the index.
fn left(&self) -> &str
Gets the first string in the pair.
fn right(&self) -> &str
Gets the second string in the pair.
Trait Implementations
impl Eq for StringPair
[src]
impl PartialEq for StringPair
[src]
fn eq(&self, __arg_0: &StringPair) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &StringPair) -> bool
This method tests for !=
.
impl Clone for StringPair
[src]
fn clone(&self) -> StringPair
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Default for StringPair
[src]
fn default() -> StringPair
Returns the "default value" for a type. Read more
impl Hash for StringPair
[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<S1: Into<String>, S2: AsRef<str>> From<(S1, S2)> for StringPair
[src]
fn from((s1, s2): (S1, S2)) -> StringPair
Performs the conversion.
impl PartialOrd for StringPair
[src]
fn partial_cmp(&self, rhs: &StringPair) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for StringPair
[src]
fn cmp(&self, rhs: &StringPair) -> Ordering
This method returns an Ordering
between self
and other
. Read more