std.tuple.Tuple1
class pub Tuple1[A]
A 1-ary tuple.
Fields
0
let pub @0: A
Instance methods
!=
Show source codeHide 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 codeHide source code
fn pub ==(other: ref Tuple1[A]) -> Bool {
@0 == other.0
}
fn pub ==(other: ref (A)) -> Bool
if
A: Equal[ref A]
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 codeHide source code
fn pub clone -> Tuple1[A] {
(@0.clone,)
}
fn pub clone -> (A)
if
A: Clone[A]
Creates a clone of self
.
fmt
Show source codeHide source code
fn pub fmt(formatter: mut Formatter) {
formatter.tuple('').field(@0).finish
}
fn pub fmt(formatter: mut Formatter)
if
A: Format
Formats self
in a human-readable format for debugging purposes.
hash
Show source codeHide source code
fn pub hash[H: mut + Hasher](hasher: mut H) {
@0.hash(hasher)
}
fn pub hash[H: mut + Hasher](hasher: mut H: mut)
if
A: Hash
Writes the hash for self
into the given Hasher
.
Implemented traits
Clone
impl Clone[(A)] for Tuple1
if
A: Clone[A]
Equal
impl Equal[ref (A)] for Tuple1
if
A: Equal[ref A]
Format
impl Format for Tuple1
if
A: Format
Hash
impl Hash for Tuple1
if
A: Hash