Struct fastsim_core::simdrivelabel::LabelFe
source · pub struct LabelFe {Show 26 fields
pub veh: RustVehicle,
pub adj_params: AdjCoef,
pub lab_udds_mpgge: f64,
pub lab_hwy_mpgge: f64,
pub lab_comb_mpgge: f64,
pub lab_udds_kwh_per_mi: f64,
pub lab_hwy_kwh_per_mi: f64,
pub lab_comb_kwh_per_mi: f64,
pub adj_udds_mpgge: f64,
pub adj_hwy_mpgge: f64,
pub adj_comb_mpgge: f64,
pub adj_udds_kwh_per_mi: f64,
pub adj_hwy_kwh_per_mi: f64,
pub adj_comb_kwh_per_mi: f64,
pub adj_udds_ess_kwh_per_mi: f64,
pub adj_hwy_ess_kwh_per_mi: f64,
pub adj_comb_ess_kwh_per_mi: f64,
pub net_range_miles: f64,
pub uf: f64,
pub net_accel: f64,
pub res_found: String,
pub phev_calcs: Option<LabelFePHEV>,
pub adj_cs_comb_mpgge: Option<f64>,
pub adj_cd_comb_mpgge: Option<f64>,
pub net_phev_cd_miles: Option<f64>,
pub trace_miss_speed_mph: f64,
}Fields§
§veh: RustVehicle§adj_params: AdjCoef§lab_udds_mpgge: f64§lab_hwy_mpgge: f64§lab_comb_mpgge: f64§lab_udds_kwh_per_mi: f64§lab_hwy_kwh_per_mi: f64§lab_comb_kwh_per_mi: f64§adj_udds_mpgge: f64§adj_hwy_mpgge: f64§adj_comb_mpgge: f64§adj_udds_kwh_per_mi: f64§adj_hwy_kwh_per_mi: f64§adj_comb_kwh_per_mi: f64§adj_udds_ess_kwh_per_mi: f64§adj_hwy_ess_kwh_per_mi: f64§adj_comb_ess_kwh_per_mi: f64§net_range_miles: f64§uf: f64§net_accel: f64§res_found: String§phev_calcs: Option<LabelFePHEV>§adj_cs_comb_mpgge: Option<f64>§adj_cd_comb_mpgge: Option<f64>§net_phev_cd_miles: Option<f64>§trace_miss_speed_mph: f64Trait Implementations§
source§impl<'de> Deserialize<'de> for LabelFe
impl<'de> Deserialize<'de> for LabelFe
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl SerdeAPI for LabelFe
impl SerdeAPI for LabelFe
const ACCEPTED_BYTE_FORMATS: &'static [&'static str] = _
const ACCEPTED_STR_FORMATS: &'static [&'static str] = _
const RESOURCE_PREFIX: &'static str = ""
const CACHE_FOLDER: &'static str = ""
source§fn list_resources() -> Vec<String>
fn list_resources() -> Vec<String>
List available (compiled) resources (stored in the rust binary) Read more
source§fn from_resource<P: AsRef<Path>>(filepath: P, skip_init: bool) -> Result<Self>
fn from_resource<P: AsRef<Path>>(filepath: P, skip_init: bool) -> Result<Self>
Read (deserialize) an object from a resource file packaged with the
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<()>
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 morefn to_writer<W: Write>(&self, wtr: W, format: &str) -> Result<()>
source§fn from_file<P: AsRef<Path>>(filepath: P, skip_init: bool) -> Result<Self>
fn from_file<P: AsRef<Path>>(filepath: P, skip_init: bool) -> Result<Self>
Read (deserialize) an object from a file.
Supported file extensions are listed in
ACCEPTED_BYTE_FORMATS. Read moresource§fn to_str(&self, format: &str) -> Result<String>
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,
skip_init: bool,
) -> Result<Self>
fn from_str<S: AsRef<str>>( contents: S, format: &str, skip_init: bool, ) -> Result<Self>
Read (deserialize) an object from a string Read more
source§fn from_reader<R: Read>(rdr: R, format: &str, skip_init: bool) -> Result<Self>
fn from_reader<R: Read>(rdr: R, format: &str, skip_init: bool) -> Result<Self>
Deserialize an object from anything that implements
std::io::Read Read moresource§fn from_json<S: AsRef<str>>(json_str: S, skip_init: bool) -> Result<Self>
fn from_json<S: AsRef<str>>(json_str: S, skip_init: bool) -> Result<Self>
Read (deserialize) an object to a JSON string Read more
source§fn from_yaml<S: AsRef<str>>(yaml_str: S, skip_init: bool) -> Result<Self>
fn from_yaml<S: AsRef<str>>(yaml_str: S, skip_init: bool) -> Result<Self>
Read (deserialize) an object from a YAML string Read more
fn to_toml(&self) -> Result<String>
fn from_toml<S: AsRef<str>>(toml_str: S, skip_init: bool) -> Result<Self>
source§fn from_url<S: AsRef<str>>(url: S, skip_init: bool) -> Result<Self>
fn from_url<S: AsRef<str>>(url: S, skip_init: bool) -> 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<()>
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
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, skip_init: bool) -> Result<Self>
fn from_cache<P: AsRef<Path>>(file_path: P, skip_init: bool) -> 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
impl StructuralPartialEq for LabelFe
Auto Trait Implementations§
impl Freeze for LabelFe
impl RefUnwindSafe for LabelFe
impl Send for LabelFe
impl Sync for LabelFe
impl Unpin for LabelFe
impl UnwindSafe for LabelFe
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more