Struct fastsim_core::vehicle_utils::VehicleDataFE
source · pub struct VehicleDataFE {Show 37 fields
pub id: i32,
pub year: u32,
pub make: String,
pub model: String,
pub veh_class: String,
pub drive: String,
pub alt_veh_type: String,
pub fuel_type: String,
pub fuel1: String,
pub fuel2: String,
pub eng_dscr: String,
pub cylinders: String,
pub displ: String,
pub transmission: String,
pub super_charger: String,
pub turbo_charger: String,
pub start_stop: String,
pub phev_blended: bool,
pub phev_city_mpge: i32,
pub phev_comb_mpge: i32,
pub phev_hwy_mpge: i32,
pub ev_motor_kw: String,
pub range_ev: i32,
pub city_mpg_fuel1: f64,
pub city_mpg_fuel2: f64,
pub unadj_city_mpg_fuel1: f64,
pub unadj_city_mpg_fuel2: f64,
pub city_kwh_per_100mi: f64,
pub highway_mpg_fuel1: f64,
pub highway_mpg_fuel2: f64,
pub unadj_highway_mpg_fuel1: f64,
pub unadj_highway_mpg_fuel2: f64,
pub highway_kwh_per_100mi: f64,
pub comb_mpg_fuel1: f64,
pub comb_mpg_fuel2: f64,
pub comb_kwh_per_100mi: f64,
pub emissions_list: EmissionsListFE,
}Expand description
Struct containing vehicle data from fueleconomy.gov
Fields§
§id: i32Vehicle ID
year: u32Model year
make: StringVehicle make
model: StringVehicle model
veh_class: StringEPA vehicle size class
drive: StringDrive axle type (FWD, RWD, AWD, 4WD)
alt_veh_type: StringType of alternative fuel vehicle (Hybrid, Plug-in Hybrid, EV)
fuel_type: StringCombined vehicle fuel type (fuel 1 and fuel 2)
fuel1: StringFuel type 1
fuel2: StringFuel type 2
eng_dscr: StringDescription of engine
cylinders: StringNumber of engine cylinders
displ: StringEngine displacement in liters
transmission: Stringtransmission
super_charger: String“S” if vehicle has supercharger
turbo_charger: String“T” if vehicle has turbocharger
start_stop: StringStop-start technology
phev_blended: boolVehicle operates on blend of gasoline and electricity
phev_city_mpge: i32EPA composite gasoline-electricity city MPGe
phev_comb_mpge: i32EPA composite gasoline-electricity combined MPGe
phev_hwy_mpge: i32EPA composite gasoline-electricity highway MPGe
ev_motor_kw: StringElectric motor power (kW), not very consistent as an input
range_ev: i32EV range
city_mpg_fuel1: f64City MPG for fuel 1
city_mpg_fuel2: f64City MPG for fuel 2
unadj_city_mpg_fuel1: f64Unadjusted unroaded city MPG for fuel 1
unadj_city_mpg_fuel2: f64Unadjusted unroaded city MPG for fuel 2
city_kwh_per_100mi: f64City electricity consumption in kWh/100 mi
highway_mpg_fuel1: f64Adjusted unrounded highway MPG for fuel 1
highway_mpg_fuel2: f64Adjusted unrounded highway MPG for fuel 2
unadj_highway_mpg_fuel1: f64Unadjusted unrounded highway MPG for fuel 1
unadj_highway_mpg_fuel2: f64Unadjusted unrounded highway MPG for fuel 2
highway_kwh_per_100mi: f64Highway electricity consumption in kWh/100 mi
comb_mpg_fuel1: f64Combined MPG for fuel 1
comb_mpg_fuel2: f64Combined MPG for fuel 2
comb_kwh_per_100mi: f64Combined electricity consumption in kWh/100 mi
emissions_list: EmissionsListFEList of emissions tests
Trait Implementations§
source§impl Clone for VehicleDataFE
impl Clone for VehicleDataFE
source§fn clone(&self) -> VehicleDataFE
fn clone(&self) -> VehicleDataFE
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for VehicleDataFE
impl Debug for VehicleDataFE
source§impl Default for VehicleDataFE
impl Default for VehicleDataFE
source§fn default() -> VehicleDataFE
fn default() -> VehicleDataFE
source§impl<'de> Deserialize<'de> for VehicleDataFE
impl<'de> Deserialize<'de> for VehicleDataFE
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for VehicleDataFE
impl PartialEq for VehicleDataFE
source§fn eq(&self, other: &VehicleDataFE) -> bool
fn eq(&self, other: &VehicleDataFE) -> bool
self and other values to be equal, and is used
by ==.source§impl SerdeAPI for VehicleDataFE
impl SerdeAPI for VehicleDataFE
const ACCEPTED_BYTE_FORMATS: &'static [&'static str] = _
const ACCEPTED_STR_FORMATS: &'static [&'static str] = _
const CACHE_FOLDER: &'static str = _
source§fn from_resource<P: AsRef<Path>>(filepath: P) -> Result<Self>
fn from_resource<P: AsRef<Path>>(filepath: P) -> Result<Self>
fastsim-core crate Read moresource§fn to_file<P: AsRef<Path>>(&self, filepath: P) -> Result<()>
fn to_file<P: AsRef<Path>>(&self, filepath: P) -> Result<()>
ACCEPTED_BYTE_FORMATS.
Creates a new file if it does not already exist, otherwise truncates the existing file. Read morefn to_writer<W: Write>(&self, wtr: W, format: &str) -> Result<()>
source§fn from_file<P: AsRef<Path>>(filepath: P) -> Result<Self>
fn from_file<P: AsRef<Path>>(filepath: P) -> Result<Self>
ACCEPTED_BYTE_FORMATS. Read moresource§fn to_str(&self, format: &str) -> Result<String>
fn to_str(&self, format: &str) -> Result<String>
source§fn from_str<S: AsRef<str>>(contents: S, format: &str) -> Result<Self>
fn from_str<S: AsRef<str>>(contents: S, format: &str) -> Result<Self>
source§fn from_reader<R: Read>(rdr: R, format: &str) -> Result<Self>
fn from_reader<R: Read>(rdr: R, format: &str) -> Result<Self>
std::io::Read Read moresource§fn from_json<S: AsRef<str>>(json_str: S) -> Result<Self>
fn from_json<S: AsRef<str>>(json_str: S) -> Result<Self>
source§fn from_yaml<S: AsRef<str>>(yaml_str: S) -> Result<Self>
fn from_yaml<S: AsRef<str>>(yaml_str: S) -> Result<Self>
source§fn from_bincode(encoded: &[u8]) -> Result<Self>
fn from_bincode(encoded: &[u8]) -> Result<Self>
source§fn from_url<S: AsRef<str>>(url: S) -> Result<Self>
fn from_url<S: AsRef<str>>(url: S) -> Result<Self>
source§fn to_cache<P: AsRef<Path>>(&self, file_path: P) -> Result<()>
fn to_cache<P: AsRef<Path>>(&self, file_path: P) -> Result<()>
WARNING: If there is a file already in the data subdirectory with the same name, it will be replaced by the new file. Read more