pub struct ConnectionOptionsBuilder { /* private fields */ }Expand description
Builder for constructing ConnectionOptions instances.
This builder provides a fluent interface for creating connection options with optional
field overrides. All fields start as None and can be set individually before calling
build() to create the final ConnectionOptions instance.
The builder is typically created via ConnectionOptions::builder() or by converting
an existing ConnectionOptions instance using to_builder().
§Fields
-
hostname- Optional hostname or IP address override for the connection plugin name. When set, this value will override the base hostname for connections of this type. -
port- Optional port number override for the connection plugin name. When set, this value will override the base port for connections of this type. -
username- Optional username override for authentication. When set, this value will override the base username for connections of this type. -
password- Optional password override for authentication. When set, this value will override the base password for connections of this type. -
platform- Optional platform identifier override. When set, this value will override the base platform for connections of this type. -
extras- Optional arbitrary JSON data for connection-specific configuration. Allows storing additional connection parameters that don’t fit the standard fields.
§Examples
let options = ConnectionOptions::builder()
.hostname("10.0.0.1")
.port(830)
.username("netconf_user")
.build();
assert_eq!(options.hostname(), Some("10.0.0.1"));
assert_eq!(options.port(), Some(830));