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: devmode.rs
    path of file: ./repos/dev-manager-desktop/src-tauri/src/plugins
    
    the code of the file until where you have to start completion: use std::io::Read;

use regex::Regex;
use reqwest::Url;
use serde::{Deserialize, Serialize};
use tauri::{AppHandle, Manager, Runtime};
use tauri::plugin::{Builder, TauriPlugin};

use crate::device_manager::Device;
use crate::error::Error;
use crate::session_manager::SessionManager;

#[derive(Serializ
    
async fn status<R: Runtime>(app: AppHandle<R>, device: Device) -> Result<DevModeStatus, Error> {
    if let Some(token) = valid_token(app, device).await? {
        let resp = reqwest::get(
            Url::parse_with_params(
                "https://developer.lge.com/secure/CheckDevModeSession.dev",
                &[("sessionToken", &token)],
            )
            .expect("Illegal HTTP URL"),
        )
        .await?
        .error_for_status()?;
        let session = resp.json::<DevModeSession>().await?;
        if session.result == "success" {
            return Ok(DevModeStatus {
                token: Some(token),
                remaining: Some(session.error_msg.unwrap_or(String::from(""))),
            });
        }
        return Ok(DevModeStatus {
            token: Some(token),
            remaining: None,
        });
    }
    return Ok(DevModeStatus {
        token: None,
        remaining: None,
    });
}