pub struct VpsRegistro {
pub nome: String,
pub host: String,
pub porta: u16,
pub usuario: String,
pub senha: SecretString,
pub timeout_ms: u64,
pub max_chars: usize,
pub senha_sudo: Option<SecretString>,
pub senha_su: Option<SecretString>,
pub schema_version: u32,
pub adicionado_em: String,
}Expand description
Registro de uma VPS no arquivo de configuração.
Fields§
§nome: StringNome lógico único da VPS.
host: StringHostname ou IP do servidor.
porta: u16Porta SSH.
usuario: StringUsuário SSH.
senha: SecretStringSenha SSH (em memória como SecretString).
timeout_ms: u64Timeout em milissegundos.
max_chars: usizeLimite de caracteres em output.
senha_sudo: Option<SecretString>Senha para sudo (opcional).
senha_su: Option<SecretString>Senha para su - (opcional).
schema_version: u32Versão do schema deste registro.
adicionado_em: StringTimestamp RFC 3339 de inclusão.
Implementations§
Source§impl VpsRegistro
impl VpsRegistro
Sourcepub fn novo(
nome: String,
host: String,
porta: u16,
usuario: String,
senha: SecretString,
timeout_ms: Option<u64>,
max_chars: Option<usize>,
senha_sudo: Option<SecretString>,
senha_su: Option<SecretString>,
) -> Self
pub fn novo( nome: String, host: String, porta: u16, usuario: String, senha: SecretString, timeout_ms: Option<u64>, max_chars: Option<usize>, senha_sudo: Option<SecretString>, senha_su: Option<SecretString>, ) -> Self
Cria um novo registro aplicando defaults para timeout e max_chars.
Trait Implementations§
Source§impl Clone for VpsRegistro
impl Clone for VpsRegistro
Source§fn clone(&self) -> VpsRegistro
fn clone(&self) -> VpsRegistro
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VpsRegistro
impl Debug for VpsRegistro
Source§impl<'de> Deserialize<'de> for VpsRegistro
impl<'de> Deserialize<'de> for VpsRegistro
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VpsRegistro
impl RefUnwindSafe for VpsRegistro
impl Send for VpsRegistro
impl Sync for VpsRegistro
impl Unpin for VpsRegistro
impl UnsafeUnpin for VpsRegistro
impl UnwindSafe for VpsRegistro
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