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: i32

Vehicle ID

§year: u32

Model year

§make: String

Vehicle make

§model: String

Vehicle model

§veh_class: String

EPA vehicle size class

§drive: String

Drive axle type (FWD, RWD, AWD, 4WD)

§alt_veh_type: String

Type of alternative fuel vehicle (Hybrid, Plug-in Hybrid, EV)

§fuel_type: String

Combined vehicle fuel type (fuel 1 and fuel 2)

§fuel1: String

Fuel type 1

§fuel2: String

Fuel type 2

§eng_dscr: String

Description of engine

§cylinders: String

Number of engine cylinders

§displ: String

Engine displacement in liters

§transmission: String

transmission

§super_charger: String

“S” if vehicle has supercharger

§turbo_charger: String

“T” if vehicle has turbocharger

§start_stop: String

Stop-start technology

§phev_blended: bool

Vehicle operates on blend of gasoline and electricity

§phev_city_mpge: i32

EPA composite gasoline-electricity city MPGe

§phev_comb_mpge: i32

EPA composite gasoline-electricity combined MPGe

§phev_hwy_mpge: i32

EPA composite gasoline-electricity highway MPGe

§ev_motor_kw: String

Electric motor power (kW), not very consistent as an input

§range_ev: i32

EV range

§city_mpg_fuel1: f64

City MPG for fuel 1

§city_mpg_fuel2: f64

City MPG for fuel 2

§unadj_city_mpg_fuel1: f64

Unadjusted unroaded city MPG for fuel 1

§unadj_city_mpg_fuel2: f64

Unadjusted unroaded city MPG for fuel 2

§city_kwh_per_100mi: f64

City electricity consumption in kWh/100 mi

§highway_mpg_fuel1: f64

Adjusted unrounded highway MPG for fuel 1

§highway_mpg_fuel2: f64

Adjusted unrounded highway MPG for fuel 2

§unadj_highway_mpg_fuel1: f64

Unadjusted unrounded highway MPG for fuel 1

§unadj_highway_mpg_fuel2: f64

Unadjusted unrounded highway MPG for fuel 2

§highway_kwh_per_100mi: f64

Highway electricity consumption in kWh/100 mi

§comb_mpg_fuel1: f64

Combined MPG for fuel 1

§comb_mpg_fuel2: f64

Combined MPG for fuel 2

§comb_kwh_per_100mi: f64

Combined electricity consumption in kWh/100 mi

§emissions_list: EmissionsListFE

List of emissions tests

Trait Implementations§

source§

impl Clone for VehicleDataFE

source§

fn clone(&self) -> VehicleDataFE

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VehicleDataFE

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for VehicleDataFE

source§

fn default() -> VehicleDataFE

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for VehicleDataFE

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for VehicleDataFE

source§

fn eq(&self, other: &VehicleDataFE) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl SerdeAPI for VehicleDataFE

source§

const ACCEPTED_BYTE_FORMATS: &'static [&'static str] = _

source§

const ACCEPTED_STR_FORMATS: &'static [&'static str] = _

source§

const CACHE_FOLDER: &'static str = _

source§

fn init(&mut self) -> Result<()>

Specialized code to execute upon initialization
source§

fn from_resource<P: AsRef<Path>>(filepath: P) -> Result<Self>

Read (deserialize) an object from a resource file packaged with the fastsim-core crate Read more
source§

fn to_file<P: AsRef<Path>>(&self, filepath: P) -> Result<()>

Write (serialize) an object to a file. Supported file extensions are listed in ACCEPTED_BYTE_FORMATS. Creates a new file if it does not already exist, otherwise truncates the existing file. Read more
source§

fn to_writer<W: Write>(&self, wtr: W, format: &str) -> Result<()>

source§

fn from_file<P: AsRef<Path>>(filepath: P) -> Result<Self>

Read (deserialize) an object from a file. Supported file extensions are listed in ACCEPTED_BYTE_FORMATS. Read more
source§

fn to_str(&self, format: &str) -> Result<String>

Write (serialize) an object into a string Read more
source§

fn from_str<S: AsRef<str>>(contents: S, format: &str) -> Result<Self>

Read (deserialize) an object from a string Read more
source§

fn from_reader<R: Read>(rdr: R, format: &str) -> Result<Self>

Deserialize an object from anything that implements std::io::Read Read more
source§

fn to_json(&self) -> Result<String>

Write (serialize) an object to a JSON string
source§

fn from_json<S: AsRef<str>>(json_str: S) -> Result<Self>

Read (deserialize) an object to a JSON string Read more
source§

fn to_yaml(&self) -> Result<String>

Write (serialize) an object to a YAML string
source§

fn from_yaml<S: AsRef<str>>(yaml_str: S) -> Result<Self>

Read (deserialize) an object from a YAML string Read more
source§

fn to_bincode(&self) -> Result<Vec<u8>>

Write (serialize) an object to bincode-encoded bytes
source§

fn from_bincode(encoded: &[u8]) -> Result<Self>

Read (deserialize) an object from bincode-encoded bytes Read more
source§

fn from_url<S: AsRef<str>>(url: S) -> Result<Self>

Instantiates an object from a url. Accepts yaml and json file types Read more
source§

fn to_cache<P: AsRef<Path>>(&self, file_path: P) -> Result<()>

Takes an instantiated Rust object and saves it in the FASTSim data directory in a rust_objects folder.
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
source§

fn from_cache<P: AsRef<Path>>(file_path: P) -> Result<Self>

Instantiates a Rust object from the subdirectory within the FASTSim data directory corresponding to the Rust Object (“vehices” for a RustVehice, “cycles” for a RustCycle, and the root folder of the data directory for all other objects). Read more
source§

impl Serialize for VehicleDataFE

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for VehicleDataFE

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> DeserializeOwnedAlias for T

source§

impl<T> SendAlias for T

§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,

source§

impl<T> SerializeAlias for T
where T: Serialize,

source§

impl<T> SyncAlias for T