Search results

There are no results.

std.uri.UserInfo

type pub inline UserInfo

A username and an optional password.

Fields

name

let pub @name: String

The name of the user.

password

let pub @password: String

The optional password.

An empty value signals the lack of a password.

Instance methods

!=

Show source code
Hide source code
fn pub !=(other: ref Self) -> Bool {
  !(self == other)
}
fn pub !=(other: ref Self) -> 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 UserInfo) -> Bool {
  @name == other.name and @password == other.password
}
fn pub ==(other: ref UserInfo) -> Bool

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 -> Self {
  Self(name: @name, password: @password)
}
fn pub clone -> UserInfo

Creates a clone of self.

The returned value is an owned value that is the same type as the receiver of this method. For example, cloning a ref Array[Int] results in a Array[Int], not another ref Array[Int].

fmt

Show source code
Hide source code
fn pub fmt(formatter: mut Formatter) {
  formatter
    .object('UserInfo')
    .field('name', @name)
    .field('password', @password)
    .finish
}
fn pub fmt(formatter: mut Formatter)

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

Implemented traits

std.clone.

Clone

impl Clone for UserInfo
std.cmp.

Equal

impl Equal for UserInfo
std.fmt.

Format

impl Format for UserInfo