ruwebframe 0.1.2

a simple webframe for rust actix-web, based on rudi and rbatis.
Documentation
use displaydoc::Display;
use serde::{Deserialize, Serialize};
use crate::rubase::rudto::cfgdto::softdto::SoftDto;
use crate::rubase::rutils::strutils;

#[derive(Debug, Display, Default, Clone, Deserialize, Serialize)]
pub struct RedisDto {
    pub addr: String,   
    pub password: String,
    pub db: i32,
    pub enable: bool,
}

impl RedisDto {
    pub fn new(host: String ,password: String, db: i32) -> Self {
        Self {
            addr: host,
            password: password,
            db: db,
            enable: true,
        }
    }
    pub fn build_url(&self) -> String { 
        format!("redis://{}@{}", self.password, self.addr )
    }
    
    pub fn default( ) -> Self {
        Self {
            addr: "192.168.1.153:26379".to_string(),
            password: "223456".to_string(),
            db: 0,
            enable: true,
        }
    }
    pub fn parse_env_var(&mut self)   {
        self.addr= strutils::parse_env_var(std::mem::take(&mut self.addr));
        self.password= strutils::parse_env_var(std::mem::take(&mut self.password));

    }
}
//  let client = redis::Client::open("redis://123456@192.168.1.153:26379/")?;
//  let mut con = client.get_connection()?;