pub fn insert(&mut self, conn: Pool) {
        self.password = hash_password(&self.password);

        conn.execute(
            "INSERT INTO account (id, name, email, password) VALUES ($1, $2, $3, $4)",
            &[&self.id, &self.name, &self.email, &self.password],
        )
        .unwrap();
    }
/**
     * Insert an new account in the database
     * Password is secured at this point
     */
Insert an new account in the database
Password is secured at this point
Insert an new account in the database Password is secured at this point
pub fn insert(&mut self, conn: Pool) {
        self.password = hash_password(&self.password);
        conn.execute(
            "INSERT INTO account (id, name, email, password) VALUES ($1, $2, $3, $4)",
            &[&self.id, &self.name, &self.email, &self.password],
        )
        .unwrap();
    }
pub fn insert ( & mut self , conn : Pool ) { self . password = hash_password ( & self . password ) ; conn . execute ( " " , & [ & self . id , & self . name , & self . email , & self . password ] , ) . unwrap ( ) ; }
Insert an new account in the database
 Password is secured at this point
Insert an new account in the database Password is secured at this point
&mut self
conn
Pool