e-clients 0.1.8

a rust services link upload: ftp、local、ssh、smb
#[derive(Debug, Default, Clone)]
pub struct SmbCredentials {
  pub(crate) server: String,
  pub(crate) share: String,
  pub(crate) username: Option<String>,
  pub(crate) password: Option<String>,
}

impl SmbCredentials {
  pub fn new<S1: AsRef<str>, S2: AsRef<str>>(server: S1, share: S2) -> Self {
    Self {
      server: server.as_ref().to_string(),
      share: share.as_ref().to_string(),
      ..Default::default()
    }
  }

  /// Construct SmbCredentials with the provided username
  pub fn username<S: AsRef<str>>(mut self, username: S) -> Self {
    self.username = Some(username.as_ref().to_string());
    self
  }

  /// Construct SmbCredentials with the provided password
  pub fn password<S: AsRef<str>>(mut self, password: S) -> Self {
    self.password = Some(password.as_ref().to_string());
    self
  }
}