tuple - Rust (original) (raw)
Primitive Type tuple
1.0.0· [−]
Expand description
A finite heterogeneous sequence, (T, U, ..)
.
Let’s cover each of those in turn:
Tuples are finite. In other words, a tuple has a length. Here’s a tuple of length 3
:
‘Length’ is also sometimes called ‘arity’ here; each tuple of a different length is a different, distinct type.
Tuples are heterogeneous. This means that each element of the tuple can have a different type. In that tuple above, it has the type:
(&'static str, i32, char)
Tuples are a sequence. This means that they can be accessed by position; this is called ‘tuple indexing’, and it looks like this:
let tuple = ("hello", 5, 'c');
assert_eq!(tuple.0, "hello");
assert_eq!(tuple.1, 5);
assert_eq!(tuple.2, 'c');
The sequential nature of the tuple applies to its implementations of various traits. For example, in PartialOrd and Ord, the elements are compared sequentially until the first non-equal set is found.
For more about tuples, see the book.
If every type inside a tuple implements one of the following traits, then a tuple itself also implements it.
Due to a temporary restriction in Rust’s type system, these traits are only implemented on tuples of arity 12 or less. In the future, this may change.
Basic usage:
let tuple = ("hello", 5, 'c');
assert_eq!(tuple.0, "hello");
Tuples are often used as a return type when you want to return more than one value:
fn calculate_point() -> (i32, i32) {
// Don't do a calculation, that's not the point of the example
(4, 5)
}
let point = calculate_point();
assert_eq!(point.0, 4);
assert_eq!(point.1, 5);
// Combining this with patterns can be nicer.
let (x, y) = calculate_point();
assert_eq!(x, 4);
assert_eq!(y, 5);
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Debug for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) where
T0: Debug,
T1: Debug,
T2: Debug,
T3: Debug,
T4: Debug,
T5: Debug,
T6: Debug,
T7: Debug,
T8: Debug,
T9: Debug,
T10: Debug,
T11: Debug + ?Sized,
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
impl<T3, T4, T5, T6, T7, T8, T9, T10, T11> Debug for (T3, T4, T5, T6, T7, T8, T9, T10, T11) where
T3: Debug,
T4: Debug,
T5: Debug,
T6: Debug,
T7: Debug,
T8: Debug,
T9: Debug,
T10: Debug,
T11: Debug + ?Sized,
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
impl<T5, T6, T7, T8, T9, T10, T11> Debug for (T5, T6, T7, T8, T9, T10, T11) where
T5: Debug,
T6: Debug,
T7: Debug,
T8: Debug,
T9: Debug,
T10: Debug,
T11: Debug + ?Sized,
Formats the value using the given formatter. Read more
impl<T6, T7, T8, T9, T10, T11> Debug for (T6, T7, T8, T9, T10, T11) where
T6: Debug,
T7: Debug,
T8: Debug,
T9: Debug,
T10: Debug,
T11: Debug + ?Sized,
Formats the value using the given formatter. Read more
impl<T7, T8, T9, T10, T11> Debug for (T7, T8, T9, T10, T11) where
T7: Debug,
T8: Debug,
T9: Debug,
T10: Debug,
T11: Debug + ?Sized,
Formats the value using the given formatter. Read more
impl<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Debug for (T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) where
T2: Debug,
T3: Debug,
T4: Debug,
T5: Debug,
T6: Debug,
T7: Debug,
T8: Debug,
T9: Debug,
T10: Debug,
T11: Debug + ?Sized,
Formats the value using the given formatter. Read more
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Debug for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) where
T1: Debug,
T2: Debug,
T3: Debug,
T4: Debug,
T5: Debug,
T6: Debug,
T7: Debug,
T8: Debug,
T9: Debug,
T10: Debug,
T11: Debug + ?Sized,
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
impl<T4, T5, T6, T7, T8, T9, T10, T11> Debug for (T4, T5, T6, T7, T8, T9, T10, T11) where
T4: Debug,
T5: Debug,
T6: Debug,
T7: Debug,
T8: Debug,
T9: Debug,
T10: Debug,
T11: Debug + ?Sized,
Formats the value using the given formatter. Read more
impl<T8, T9, T10, T11> Debug for (T8, T9, T10, T11) where
T8: Debug,
T9: Debug,
T10: Debug,
T11: Debug + ?Sized,
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
impl<A, B, C, D, E, F, G, H, I, J, K> Default for (A, B, C, D, E, F, G, H, I, J, K) where
A: Default,
B: Default,
C: Default,
D: Default,
E: Default,
F: Default,
G: Default,
H: Default,
I: Default,
J: Default,
K: Default,
Returns the “default value” for a type. Read more
impl<A, B, C, D, E> Default for (A, B, C, D, E) where
A: Default,
B: Default,
C: Default,
D: Default,
E: Default,
Returns the “default value” for a type. Read more
Returns the “default value” for a type. Read more
impl<A, B, C, D> Default for (A, B, C, D) where
A: Default,
B: Default,
C: Default,
D: Default,
Returns the “default value” for a type. Read more
impl<A, B, C, D, E, F, G, H, I> Default for (A, B, C, D, E, F, G, H, I) where
A: Default,
B: Default,
C: Default,
D: Default,
E: Default,
F: Default,
G: Default,
H: Default,
I: Default,
Returns the “default value” for a type. Read more
impl<A, B, C, D, E, F, G, H, I, J> Default for (A, B, C, D, E, F, G, H, I, J) where
A: Default,
B: Default,
C: Default,
D: Default,
E: Default,
F: Default,
G: Default,
H: Default,
I: Default,
J: Default,
Returns the “default value” for a type. Read more
impl<A, B, C, D, E, F, G> Default for (A, B, C, D, E, F, G) where
A: Default,
B: Default,
C: Default,
D: Default,
E: Default,
F: Default,
G: Default,
Returns the “default value” for a type. Read more
Returns the “default value” for a type. Read more
impl<A, B, C, D, E, F, G, H, I, J, K, L> Default for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: Default,
B: Default,
C: Default,
D: Default,
E: Default,
F: Default,
G: Default,
H: Default,
I: Default,
J: Default,
K: Default,
L: Default,
Returns the “default value” for a type. Read more
impl<A, B, C, D, E, F, G, H> Default for (A, B, C, D, E, F, G, H) where
A: Default,
B: Default,
C: Default,
D: Default,
E: Default,
F: Default,
G: Default,
H: Default,
Returns the “default value” for a type. Read more
impl<A, B, C, D, E, F> Default for (A, B, C, D, E, F) where
A: Default,
B: Default,
C: Default,
D: Default,
E: Default,
F: Default,
Returns the “default value” for a type. Read more
Extends a collection with the contents of an iterator. Read more
🔬 This is a nightly-only experimental API. (extend_one
#72631)
Extends a collection with exactly one element.
🔬 This is a nightly-only experimental API. (extend_one
#72631)
Reserves capacity in a collection for the given number of additional elements. Read more
Extends a collection with the contents of an iterator. Read more
🔬 This is a nightly-only experimental API. (extend_one
#72631)
Extends a collection with exactly one element.
🔬 This is a nightly-only experimental API. (extend_one
#72631)
Reserves capacity in a collection for the given number of additional elements. Read more
impl<A, B, ExtendA, ExtendB> Extend<(A, B)> for (ExtendA, ExtendB) where
ExtendA: Extend,
ExtendB: Extend,
Allows to extend
a tuple of collections that also implement Extend
.
See also: Iterator::unzip
let mut tuple = (vec![0], vec![1]);
tuple.extend([(2, 3), (4, 5), (6, 7)]);
assert_eq!(tuple.0, [0, 2, 4, 6]);
assert_eq!(tuple.1, [1, 3, 5, 7]);
// also allows for arbitrarily nested tuples as elements
let mut nested_tuple = (vec![1], (vec![2], vec![3]));
nested_tuple.extend([(4, (5, 6)), (7, (8, 9))]);
let (a, (b, c)) = nested_tuple;
assert_eq!(a, [1, 4, 7]);
assert_eq!(b, [2, 5, 8]);
assert_eq!(c, [3, 6, 9]);
🔬 This is a nightly-only experimental API. (extend_one
#72631)
Extends a collection with exactly one element.
🔬 This is a nightly-only experimental API. (extend_one
#72631)
Reserves capacity in a collection for the given number of additional elements. Read more
Extends a collection with the contents of an iterator. Read more
🔬 This is a nightly-only experimental API. (extend_one
#72631)
Extends a collection with exactly one element.
🔬 This is a nightly-only experimental API. (extend_one
#72631)
Reserves capacity in a collection for the given number of additional elements. Read more
Inserts all new key-values from the iterator and replaces values with existing keys with new values returned from the iterator.
Extends a collection with the contents of an iterator. Read more
🔬 This is a nightly-only experimental API. (extend_one
#72631)
Extends a collection with exactly one element.
🔬 This is a nightly-only experimental API. (extend_one
#72631)
Reserves capacity in a collection for the given number of additional elements. Read more
impl<A, B, C, D, E, F, G, H, I, J, K, L> Hash for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: Hash,
B: Hash,
C: Hash,
D: Hash,
E: Hash,
F: Hash,
G: Hash,
H: Hash,
I: Hash,
J: Hash,
K: Hash,
L: Hash + ?Sized,
impl<A, B, C, D, E, F, G, H, I, J> Hash for (A, B, C, D, E, F, G, H, I, J) where
A: Hash,
B: Hash,
C: Hash,
D: Hash,
E: Hash,
F: Hash,
G: Hash,
H: Hash,
I: Hash,
J: Hash + ?Sized,
impl<A, B, C, D, E, F, G, H, I> Hash for (A, B, C, D, E, F, G, H, I) where
A: Hash,
B: Hash,
C: Hash,
D: Hash,
E: Hash,
F: Hash,
G: Hash,
H: Hash,
I: Hash + ?Sized,
impl<A, B, C, D, E, F> Hash for (A, B, C, D, E, F) where
A: Hash,
B: Hash,
C: Hash,
D: Hash,
E: Hash,
F: Hash + ?Sized,
impl<A, B, C, D, E, F, G> Hash for (A, B, C, D, E, F, G) where
A: Hash,
B: Hash,
C: Hash,
D: Hash,
E: Hash,
F: Hash,
G: Hash + ?Sized,
impl<A, B, C, D, E> Hash for (A, B, C, D, E) where
A: Hash,
B: Hash,
C: Hash,
D: Hash,
E: Hash + ?Sized,
impl<A, B, C, D, E, F, G, H> Hash for (A, B, C, D, E, F, G, H) where
A: Hash,
B: Hash,
C: Hash,
D: Hash,
E: Hash,
F: Hash,
G: Hash,
H: Hash + ?Sized,
impl<A, B, C, D, E, F, G, H, I, J, K> Hash for (A, B, C, D, E, F, G, H, I, J, K) where
A: Hash,
B: Hash,
C: Hash,
D: Hash,
E: Hash,
F: Hash,
G: Hash,
H: Hash,
I: Hash,
J: Hash,
K: Hash + ?Sized,
impl<A, B, C, D> Hash for (A, B, C, D) where
A: Hash,
B: Hash,
C: Hash,
D: Hash + ?Sized,
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
impl<A, B, C, D, E> Ord for (A, B, C, D, E) where
A: Ord,
B: Ord,
C: Ord,
D: Ord,
E: Ord + ?Sized,
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
impl<A, B, C, D> Ord for (A, B, C, D) where
A: Ord,
B: Ord,
C: Ord,
D: Ord + ?Sized,
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
impl<A, B, C, D, E, F> Ord for (A, B, C, D, E, F) where
A: Ord,
B: Ord,
C: Ord,
D: Ord,
E: Ord,
F: Ord + ?Sized,
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
impl<A, B, C, D, E, F, G, H, I, J, K, L> Ord for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: Ord,
B: Ord,
C: Ord,
D: Ord,
E: Ord,
F: Ord,
G: Ord,
H: Ord,
I: Ord,
J: Ord,
K: Ord,
L: Ord + ?Sized,
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
impl<A, B, C, D, E, F, G, H, I, J> Ord for (A, B, C, D, E, F, G, H, I, J) where
A: Ord,
B: Ord,
C: Ord,
D: Ord,
E: Ord,
F: Ord,
G: Ord,
H: Ord,
I: Ord,
J: Ord + ?Sized,
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
impl<A, B, C, D, E, F, G, H, I> Ord for (A, B, C, D, E, F, G, H, I) where
A: Ord,
B: Ord,
C: Ord,
D: Ord,
E: Ord,
F: Ord,
G: Ord,
H: Ord,
I: Ord + ?Sized,
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
impl<A, B, C, D, E, F, G> Ord for (A, B, C, D, E, F, G) where
A: Ord,
B: Ord,
C: Ord,
D: Ord,
E: Ord,
F: Ord,
G: Ord + ?Sized,
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
impl<A, B, C, D, E, F, G, H> Ord for (A, B, C, D, E, F, G, H) where
A: Ord,
B: Ord,
C: Ord,
D: Ord,
E: Ord,
F: Ord,
G: Ord,
H: Ord + ?Sized,
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
impl<A, B, C, D, E, F, G, H, I, J, K> Ord for (A, B, C, D, E, F, G, H, I, J, K) where
A: Ord,
B: Ord,
C: Ord,
D: Ord,
E: Ord,
F: Ord,
G: Ord,
H: Ord,
I: Ord,
J: Ord,
K: Ord + ?Sized,
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
impl<A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<(A, B, C, D, E, F, G, H, I, J, K, L)> for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: PartialEq,
B: PartialEq,
C: PartialEq,
D: PartialEq,
E: PartialEq,
F: PartialEq,
G: PartialEq,
H: PartialEq,
I: PartialEq,
J: PartialEq,
K: PartialEq,
L: PartialEq + ?Sized,
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
impl<A, B, C, D, E, F, G, H, I, J, K> PartialEq<(A, B, C, D, E, F, G, H, I, J, K)> for (A, B, C, D, E, F, G, H, I, J, K) where
A: PartialEq,
B: PartialEq,
C: PartialEq,
D: PartialEq,
E: PartialEq,
F: PartialEq,
G: PartialEq,
H: PartialEq,
I: PartialEq,
J: PartialEq,
K: PartialEq + ?Sized,
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
impl<A, B, C, D, E, F, G, H, I, J> PartialEq<(A, B, C, D, E, F, G, H, I, J)> for (A, B, C, D, E, F, G, H, I, J) where
A: PartialEq,
B: PartialEq,
C: PartialEq,
D: PartialEq,
E: PartialEq,
F: PartialEq,
G: PartialEq,
H: PartialEq,
I: PartialEq,
J: PartialEq + ?Sized,
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
impl<A, B, C, D, E, F, G, H, I> PartialEq<(A, B, C, D, E, F, G, H, I)> for (A, B, C, D, E, F, G, H, I) where
A: PartialEq,
B: PartialEq,
C: PartialEq,
D: PartialEq,
E: PartialEq,
F: PartialEq,
G: PartialEq,
H: PartialEq,
I: PartialEq + ?Sized,
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
impl<A, B, C, D, E, F, G, H> PartialEq<(A, B, C, D, E, F, G, H)> for (A, B, C, D, E, F, G, H) where
A: PartialEq,
B: PartialEq,
C: PartialEq,
D: PartialEq,
E: PartialEq,
F: PartialEq,
G: PartialEq,
H: PartialEq + ?Sized,
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
impl<A, B, C, D, E, F, G> PartialEq<(A, B, C, D, E, F, G)> for (A, B, C, D, E, F, G) where
A: PartialEq,
B: PartialEq,
C: PartialEq,
D: PartialEq,
E: PartialEq,
F: PartialEq,
G: PartialEq + ?Sized,
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
impl<A, B, C, D, E, F> PartialEq<(A, B, C, D, E, F)> for (A, B, C, D, E, F) where
A: PartialEq,
B: PartialEq,
C: PartialEq,
D: PartialEq,
E: PartialEq,
F: PartialEq + ?Sized,
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
impl<A, B, C, D, E> PartialEq<(A, B, C, D, E)> for (A, B, C, D, E) where
A: PartialEq,
B: PartialEq,
C: PartialEq,
D: PartialEq,
E: PartialEq + ?Sized,
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
impl<A, B, C, D> PartialEq<(A, B, C, D)> for (A, B, C, D) where
A: PartialEq,
B: PartialEq,
C: PartialEq,
D: PartialEq + ?Sized,
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
impl<A, B, C, D, E, F, G, H, I, J, K, L> PartialOrd<(A, B, C, D, E, F, G, H, I, J, K, L)> for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: PartialOrd + PartialEq,
B: PartialOrd + PartialEq,
C: PartialOrd + PartialEq,
D: PartialOrd + PartialEq,
E: PartialOrd + PartialEq,
F: PartialOrd + PartialEq,
G: PartialOrd + PartialEq,
H: PartialOrd + PartialEq,
I: PartialOrd + PartialEq,
J: PartialOrd + PartialEq,
K: PartialOrd + PartialEq,
L: PartialOrd + PartialEq + ?Sized,
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 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
impl<A, B, C, D, E, F, G, H, I, J, K> PartialOrd<(A, B, C, D, E, F, G, H, I, J, K)> for (A, B, C, D, E, F, G, H, I, J, K) where
A: PartialOrd + PartialEq,
B: PartialOrd + PartialEq,
C: PartialOrd + PartialEq,
D: PartialOrd + PartialEq,
E: PartialOrd + PartialEq,
F: PartialOrd + PartialEq,
G: PartialOrd + PartialEq,
H: PartialOrd + PartialEq,
I: PartialOrd + PartialEq,
J: PartialOrd + PartialEq,
K: PartialOrd + PartialEq + ?Sized,
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 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
impl<A, B, C, D, E, F, G, H, I, J> PartialOrd<(A, B, C, D, E, F, G, H, I, J)> for (A, B, C, D, E, F, G, H, I, J) where
A: PartialOrd + PartialEq,
B: PartialOrd + PartialEq,
C: PartialOrd + PartialEq,
D: PartialOrd + PartialEq,
E: PartialOrd + PartialEq,
F: PartialOrd + PartialEq,
G: PartialOrd + PartialEq,
H: PartialOrd + PartialEq,
I: PartialOrd + PartialEq,
J: PartialOrd + PartialEq + ?Sized,
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 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
impl<A, B, C, D, E, F, G, H, I> PartialOrd<(A, B, C, D, E, F, G, H, I)> for (A, B, C, D, E, F, G, H, I) where
A: PartialOrd + PartialEq,
B: PartialOrd + PartialEq,
C: PartialOrd + PartialEq,
D: PartialOrd + PartialEq,
E: PartialOrd + PartialEq,
F: PartialOrd + PartialEq,
G: PartialOrd + PartialEq,
H: PartialOrd + PartialEq,
I: PartialOrd + PartialEq + ?Sized,
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 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
impl<A, B, C, D, E, F, G, H> PartialOrd<(A, B, C, D, E, F, G, H)> for (A, B, C, D, E, F, G, H) where
A: PartialOrd + PartialEq,
B: PartialOrd + PartialEq,
C: PartialOrd + PartialEq,
D: PartialOrd + PartialEq,
E: PartialOrd + PartialEq,
F: PartialOrd + PartialEq,
G: PartialOrd + PartialEq,
H: PartialOrd + PartialEq + ?Sized,
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 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
impl<A, B, C, D, E, F, G> PartialOrd<(A, B, C, D, E, F, G)> for (A, B, C, D, E, F, G) where
A: PartialOrd + PartialEq,
B: PartialOrd + PartialEq,
C: PartialOrd + PartialEq,
D: PartialOrd + PartialEq,
E: PartialOrd + PartialEq,
F: PartialOrd + PartialEq,
G: PartialOrd + PartialEq + ?Sized,
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 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
impl<A, B, C, D, E, F> PartialOrd<(A, B, C, D, E, F)> for (A, B, C, D, E, F) where
A: PartialOrd + PartialEq,
B: PartialOrd + PartialEq,
C: PartialOrd + PartialEq,
D: PartialOrd + PartialEq,
E: PartialOrd + PartialEq,
F: PartialOrd + PartialEq + ?Sized,
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 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
impl<A, B, C, D, E> PartialOrd<(A, B, C, D, E)> for (A, B, C, D, E) where
A: PartialOrd + PartialEq,
B: PartialOrd + PartialEq,
C: PartialOrd + PartialEq,
D: PartialOrd + PartialEq,
E: PartialOrd + PartialEq + ?Sized,
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 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
impl<A, B, C, D> PartialOrd<(A, B, C, D)> for (A, B, C, D) where
A: PartialOrd + PartialEq,
B: PartialOrd + PartialEq,
C: PartialOrd + PartialEq,
D: PartialOrd + PartialEq + ?Sized,
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 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
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 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
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 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
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 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
Returns true
if item
is contained in the range. Read more
Returns true
if item
is contained in the range. Read more
The output type returned by methods.
🔬 This is a nightly-only experimental API. (slice_index_methods
)
Returns a shared reference to the output at this location, if in bounds. Read more
🔬 This is a nightly-only experimental API. (slice_index_methods
)
Returns a mutable reference to the output at this location, if in bounds. Read more
🔬 This is a nightly-only experimental API. (slice_index_methods
)
Returns a shared reference to the output at this location, without performing any bounds checking. Calling this method with an out-of-bounds index or a dangling slice
pointer is undefined behavior even if the resulting reference is not used. Read more
🔬 This is a nightly-only experimental API. (slice_index_methods
)
Returns a mutable reference to the output at this location, without performing any bounds checking. Calling this method with an out-of-bounds index or a dangling slice
pointer is undefined behavior even if the resulting reference is not used. Read more
🔬 This is a nightly-only experimental API. (slice_index_methods
)
Returns a shared reference to the output at this location, panicking if out of bounds. Read more
🔬 This is a nightly-only experimental API. (slice_index_methods
)
Returns a mutable reference to the output at this location, panicking if out of bounds. Read more
Returned iterator over socket addresses which this type may correspond to. Read more
Returned iterator over socket addresses which this type may correspond to. Read more
Returned iterator over socket addresses which this type may correspond to. Read more
Returned iterator over socket addresses which this type may correspond to. Read more
Returned iterator over socket addresses which this type may correspond to. Read more
impl<A, B, C, D, E, F, G, H> Eq for (A, B, C, D, E, F, G, H) where
A: Eq,
B: Eq,
C: Eq,
D: Eq,
E: Eq,
F: Eq,
G: Eq,
H: Eq + ?Sized,
impl<A, B, C, D, E, F, G, H, I, J> Eq for (A, B, C, D, E, F, G, H, I, J) where
A: Eq,
B: Eq,
C: Eq,
D: Eq,
E: Eq,
F: Eq,
G: Eq,
H: Eq,
I: Eq,
J: Eq + ?Sized,
impl<A, B, C, D, E, F, G, H, I, J, K> Eq for (A, B, C, D, E, F, G, H, I, J, K) where
A: Eq,
B: Eq,
C: Eq,
D: Eq,
E: Eq,
F: Eq,
G: Eq,
H: Eq,
I: Eq,
J: Eq,
K: Eq + ?Sized,
impl<A, B, C, D, E, F> Eq for (A, B, C, D, E, F) where
A: Eq,
B: Eq,
C: Eq,
D: Eq,
E: Eq,
F: Eq + ?Sized,
impl<A, B, C, D> Eq for (A, B, C, D) where
A: Eq,
B: Eq,
C: Eq,
D: Eq + ?Sized,
impl<A, B, C, D, E, F, G, H, I, J, K, L> Eq for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: Eq,
B: Eq,
C: Eq,
D: Eq,
E: Eq,
F: Eq,
G: Eq,
H: Eq,
I: Eq,
J: Eq,
K: Eq,
L: Eq + ?Sized,
impl<A, B, C, D, E, F, G, H, I> Eq for (A, B, C, D, E, F, G, H, I) where
A: Eq,
B: Eq,
C: Eq,
D: Eq,
E: Eq,
F: Eq,
G: Eq,
H: Eq,
I: Eq + ?Sized,
impl<A, B, C, D, E> Eq for (A, B, C, D, E) where
A: Eq,
B: Eq,
C: Eq,
D: Eq,
E: Eq + ?Sized,