You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: login_model.rs
    path of file: ./repos/spot/src/app/components/login
    
    the code of the file until where you have to start completion: use std::time::SystemTime;

use gettextrs::*;

use crate::app::credentials::Credentials;
use crate::app::state::{LoginAction, TryLoginAction};
use crate::app::{ActionDispatcher, AppAction, Worker};

pub struct LoginModel {
    dispatcher: Box<dyn ActionDispatcher>,
    worker: Worker,
}

impl LoginModel {
    pub fn new(dispatcher: Box<dyn ActionDispatcher>, worker: W
    
    pub fn save_token(&self, token: String, token_expiry_time: SystemTime) {
        self.worker.send_task(async move {
            if let Ok(mut credentials) = Credentials::retrieve().await {
                credentials.token = token;
                credentials.token_expiry_time = Some(token_expiry_time);
                if let Err(err) = credentials.save().await {
                    warn!("Could not save credentials: {}", err);
                }
            }
        });
    }