Enum redis_sk::ConnectionAddr[][src]

pub enum ConnectionAddr {
    Tcp(Stringu16),
    TcpTls {
        host: String,
        port: u16,
        insecure: bool,
    },
    Unix(PathBuf),
}
Expand description

Defines the connection address.

Not all connection addresses are supported on all platforms. For instance to connect to a unix socket you need to run this on an operating system that supports them.

Variants

Tcp(Stringu16)

Format for this is (host, port).

TcpTls

Format for this is (host, port).

Show fields

Fields of TcpTls

host: String

Hostname

port: u16

Port

insecure: bool

Disable hostname verification when connecting.

Warning

You should think very carefully before you use this method. If hostname verification is not used, any valid certificate for any site will be trusted for use from any other. This introduces a significant vulnerability to man-in-the-middle attacks.

Unix(PathBuf)

Format for this is the path to the unix socket.

Implementations

Checks if this address is supported.

Because not all platforms support all connection addresses this is a quick way to figure out if a connection method is supported. Currently this only affects unix connections which are only supported on unix platforms and on older versions of rust also require an explicit feature to be enabled.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.