Search results

There are no results.

std.tuple.Tuple3

class pub Tuple3[A, B, C]

A 3-ary tuple.

Fields

0

let pub @0: A

1

let pub @1: B

2

let pub @2: C

Instance methods

!=

Show source code
Hide source code
fn pub !=(other: T) -> Bool {
  (self == other).false?
}
fn pub !=(other: T) -> Bool

Returns true if self and the given object are not equal to each other.

==

Show source code
Hide source code
fn pub ==(other: ref Tuple3[A, B, C]) -> Bool {
  @0 == other.0 and @1 == other.1 and @2 == other.2
}
fn pub ==(other: ref (A, B, C)) -> Bool
if
  A: Equal[ref A],
  B: Equal[ref B],
  C: Equal[ref C]

Returns true if self and the given object are equal to each other.

This operator is used to perform structural equality. This means two objects residing in different memory locations may be considered equal, provided their structure is equal. For example, two different arrays may be considered to have structural equality if they contain the exact same values.

clone

Show source code
Hide source code
fn pub clone -> Tuple3[A, B, C] {
  (@0.clone, @1.clone, @2.clone)
}
fn pub clone -> (A, B, C)
if
  A: Clone[A],
  B: Clone[B],
  C: Clone[C]

Creates a clone of self.

fmt

Show source code
Hide source code
fn pub fmt(formatter: mut Formatter) {
  formatter.tuple('').field(@0).field(@1).field(@2).finish
}
fn pub fmt(formatter: mut Formatter)
if
  A: Format,
  B: Format,
  C: Format

Formats self in a human-readable format for debugging purposes.

hash

Show source code
Hide source code
fn pub hash[H: mut + Hasher](hasher: mut H) {
  @0.hash(hasher)
  @1.hash(hasher)
  @2.hash(hasher)
}
fn pub hash[H: mut + Hasher](hasher: mut H: mut)
if
  A: Hash,
  B: Hash,
  C: Hash

Writes the hash for self into the given Hasher.

Implemented traits

std.clone.

Clone

impl Clone[(A, B, C)] for Tuple3
if
  A: Clone[A],
  B: Clone[B],
  C: Clone[C]
std.cmp.

Equal

impl Equal[ref (A, B, C)] for Tuple3
if
  A: Equal[ref A],
  B: Equal[ref B],
  C: Equal[ref C]
std.fmt.

Format

impl Format for Tuple3
if
  A: Format,
  B: Format,
  C: Format
std.hash.

Hash

impl Hash for Tuple3
if
  A: Hash,
  B: Hash,
  C: Hash