pub struct SshServerConfigBuilder { /* private fields */ }Expand description
Builder for SSH server configuration
Provides a fluent API for constructing custom SSH server configurations. Any field not explicitly set will use the default value.
§Example
use torrust_tracker_deployer_lib::testing::integration::ssh_server::SshServerConfig;
let config = SshServerConfig::builder()
.image_name("custom-ssh-server")
.image_tag("v2.0")
.username("admin")
.password("secret123")
.startup_wait_secs(20)
.build();Implementations§
Source§impl SshServerConfigBuilder
impl SshServerConfigBuilder
Sourcepub fn image_name(self, name: impl Into<String>) -> Self
pub fn image_name(self, name: impl Into<String>) -> Self
Set the Docker image name
Sourcepub fn password(self, password: impl Into<PlainPassword>) -> Self
pub fn password(self, password: impl Into<PlainPassword>) -> Self
Set the test password
Sourcepub fn startup_wait_secs(self, secs: u64) -> Self
pub fn startup_wait_secs(self, secs: u64) -> Self
Set the container startup wait time in seconds
Sourcepub fn dockerfile_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn dockerfile_dir(self, dir: impl Into<PathBuf>) -> Self
Set the Dockerfile directory path
Sourcepub fn build(self) -> SshServerConfig
pub fn build(self) -> SshServerConfig
Build the configuration
Any fields not explicitly set will use default values from constants.
Trait Implementations§
Source§impl Debug for SshServerConfigBuilder
impl Debug for SshServerConfigBuilder
Auto Trait Implementations§
impl Freeze for SshServerConfigBuilder
impl RefUnwindSafe for SshServerConfigBuilder
impl Send for SshServerConfigBuilder
impl Sync for SshServerConfigBuilder
impl Unpin for SshServerConfigBuilder
impl UnsafeUnpin for SshServerConfigBuilder
impl UnwindSafe for SshServerConfigBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request