tapo 0.9.0

Unofficial Tapo API Client. Works with TP-Link Tapo smart devices. Tested with light bulbs (L510, L520, L530, L535, L610, L630), light strips (L900, L920, L930), plugs (P100, P105, P110, P110M, P115), power strips (P300, P304M, P306, P316M), hubs (H100), switches (S200B, S200D, S210) and sensors (KE100, T100, T110, T300, T310, T315).
Documentation
use std::fmt;

use serde::Serialize;

#[derive(Serialize)]
pub(crate) struct LoginDeviceParams {
    username: String,
    password: String,
}

impl LoginDeviceParams {
    pub fn new(username: &str, password: &str) -> Self {
        Self {
            username: username.to_string(),
            password: password.to_string(),
        }
    }
}

impl fmt::Debug for LoginDeviceParams {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(
            f,
            r#"LoginDeviceParams {{ username: "{}", password: "OBSCURED" }}"#,
            self.username,
        )
    }
}