pub struct RustVehicle {Show 126 fields
pub doc: Option<String>,
pub props: RustPhysicalProperties,
pub scenario_name: String,
pub selection: u32,
pub veh_year: u32,
pub veh_pt_type: String,
pub drag_coef: f64,
pub drag_coef_doc: Option<String>,
pub frontal_area_m2: f64,
pub frontal_area_m2_doc: Option<String>,
pub glider_kg: f64,
pub glider_kg_doc: Option<String>,
pub veh_cg_m: f64,
pub veh_cg_m_doc: Option<String>,
pub drive_axle_weight_frac: f64,
pub drive_axle_weight_frac_doc: Option<String>,
pub wheel_base_m: f64,
pub wheel_base_m_doc: Option<String>,
pub cargo_kg: f64,
pub cargo_kg_doc: Option<String>,
pub veh_override_kg: Option<f64>,
pub veh_override_kg_doc: Option<String>,
pub comp_mass_multiplier: f64,
pub comp_mass_multiplier_doc: Option<String>,
pub fs_max_kw: f64,
pub fs_max_kw_doc: Option<String>,
pub fs_secs_to_peak_pwr: f64,
pub fs_secs_to_peak_pwr_doc: Option<String>,
pub fs_kwh: f64,
pub fs_kwh_doc: Option<String>,
pub fs_kwh_per_kg: f64,
pub fs_kwh_per_kg_doc: Option<String>,
pub fc_max_kw: f64,
pub fc_max_kw_doc: Option<String>,
pub fc_pwr_out_perc: Array1<f64>,
pub fc_pwr_out_perc_doc: Option<String>,
pub fc_eff_map: Array1<f64>,
pub fc_eff_map_doc: Option<String>,
pub fc_eff_type: String,
pub fc_eff_type_doc: Option<String>,
pub fc_sec_to_peak_pwr: f64,
pub fc_sec_to_peak_pwr_doc: Option<String>,
pub fc_base_kg: f64,
pub fc_base_kg_doc: Option<String>,
pub fc_kw_per_kg: f64,
pub fc_kw_per_kg_doc: Option<String>,
pub min_fc_time_on: f64,
pub min_fc_time_on_doc: Option<String>,
pub idle_fc_kw: f64,
pub idle_fc_kw_doc: Option<String>,
pub mc_max_kw: f64,
pub mc_max_kw_doc: Option<String>,
pub mc_pwr_out_perc: Array1<f64>,
pub mc_pwr_out_perc_doc: Option<String>,
pub mc_eff_map: Array1<f64>,
pub mc_eff_map_doc: Option<String>,
pub mc_sec_to_peak_pwr: f64,
pub mc_sec_to_peak_pwr_doc: Option<String>,
pub mc_pe_kg_per_kw: f64,
pub mc_pe_kg_per_kw_doc: Option<String>,
pub mc_pe_base_kg: f64,
pub mc_pe_base_kg_doc: Option<String>,
pub ess_max_kw: f64,
pub ess_max_kw_doc: Option<String>,
pub ess_max_kwh: f64,
pub ess_max_kwh_doc: Option<String>,
pub ess_kg_per_kwh: f64,
pub ess_kg_per_kwh_doc: Option<String>,
pub ess_base_kg: f64,
pub ess_base_kg_doc: Option<String>,
pub ess_round_trip_eff: f64,
pub ess_round_trip_eff_doc: Option<String>,
pub ess_life_coef_a: f64,
pub ess_life_coef_a_doc: Option<String>,
pub ess_life_coef_b: f64,
pub ess_life_coef_b_doc: Option<String>,
pub min_soc: f64,
pub min_soc_doc: Option<String>,
pub max_soc: f64,
pub max_soc_doc: Option<String>,
pub ess_dischg_to_fc_max_eff_perc: f64,
pub ess_dischg_to_fc_max_eff_perc_doc: Option<String>,
pub ess_chg_to_fc_max_eff_perc: f64,
pub ess_chg_to_fc_max_eff_perc_doc: Option<String>,
pub wheel_inertia_kg_m2: f64,
pub wheel_inertia_kg_m2_doc: Option<String>,
pub num_wheels: f64,
pub num_wheels_doc: Option<String>,
pub wheel_rr_coef: f64,
pub wheel_rr_coef_doc: Option<String>,
pub wheel_radius_m: f64,
pub wheel_radius_m_doc: Option<String>,
pub wheel_coef_of_fric: f64,
pub wheel_coef_of_fric_doc: Option<String>,
pub max_accel_buffer_mph: f64,
pub max_accel_buffer_mph_doc: Option<String>,
pub max_accel_buffer_perc_of_useable_soc: f64,
pub max_accel_buffer_perc_of_useable_soc_doc: Option<String>,
pub perc_high_acc_buf: f64,
pub perc_high_acc_buf_doc: Option<String>,
pub mph_fc_on: f64,
pub mph_fc_on_doc: Option<String>,
pub kw_demand_fc_on: f64,
pub kw_demand_fc_on_doc: Option<String>,
pub max_regen: f64,
pub max_regen_doc: Option<String>,
pub stop_start: bool,
pub stop_start_doc: Option<String>,
pub force_aux_on_fc: bool,
pub force_aux_on_fc_doc: Option<String>,
pub alt_eff: f64,
pub alt_eff_doc: Option<String>,
pub chg_eff: f64,
pub chg_eff_doc: Option<String>,
pub aux_kw: f64,
pub aux_kw_doc: Option<String>,
pub trans_kg: f64,
pub trans_kg_doc: Option<String>,
pub trans_eff: f64,
pub trans_eff_doc: Option<String>,
pub ess_to_fuel_ok_error: f64,
pub ess_to_fuel_ok_error_doc: Option<String>,
pub fc_peak_eff_override: Option<f64>,
pub fc_peak_eff_override_doc: Option<String>,
pub mc_peak_eff_override: Option<f64>,
pub mc_peak_eff_override_doc: Option<String>,
/* private fields */
}Expand description
Struct containing vehicle attributes
§Python Examples
import fastsim
## Load drive cycle by name
cyc_py = fastsim.cycle.Cycle.from_file("udds")
cyc_rust = cyc_py.to_rust()Fields§
§doc: Option<String>Vehicle level documentation – e.g. info about calibration/validation of vehicle and/or links to reports or other long-form documentation.
props: RustPhysicalPropertiesPhysical properties, see RustPhysicalProperties
scenario_name: StringVehicle name
selection: u32Vehicle database ID
veh_year: u32Vehicle year
veh_pt_type: String§drag_coef: f64Aerodynamic drag coefficient
drag_coef_doc: Option<String>String for documentation – e.g. info about calibration/validation.
frontal_area_m2: f64Frontal area, $m^2$
frontal_area_m2_doc: Option<String>String for documentation – e.g. info about calibration/validation.
glider_kg: f64Vehicle mass excluding cargo, passengers, and powertrain components, $kg$
glider_kg_doc: Option<String>String for documentation – e.g. info about calibration/validation.
veh_cg_m: f64Vehicle center of mass height, $m$ NOTE: positive for FWD, negative for RWD, AWD, 4WD
veh_cg_m_doc: Option<String>String for documentation – e.g. info about calibration/validation.
drive_axle_weight_frac: f64Fraction of weight on the drive axle while stopped
drive_axle_weight_frac_doc: Option<String>String for documentation – e.g. info about calibration/validation.
wheel_base_m: f64Wheelbase, $m$
wheel_base_m_doc: Option<String>String for documentation – e.g. info about calibration/validation.
cargo_kg: f64Cargo mass including passengers, $kg$
cargo_kg_doc: Option<String>String for documentation – e.g. info about calibration/validation.
veh_override_kg: Option<f64>Total vehicle mass, overrides mass calculation, $kg$
veh_override_kg_doc: Option<String>String for documentation – e.g. info about calibration/validation.
comp_mass_multiplier: f64Component mass multiplier for vehicle mass calculation
comp_mass_multiplier_doc: Option<String>String for documentation – e.g. info about calibration/validation.
fs_max_kw: f64Fuel storage max power output, $kW$
fs_max_kw_doc: Option<String>String for documentation – e.g. info about calibration/validation.
fs_secs_to_peak_pwr: f64Fuel storage time to peak power, $s$
fs_secs_to_peak_pwr_doc: Option<String>String for documentation – e.g. info about calibration/validation.
fs_kwh: f64Fuel storage energy capacity, $kWh$
fs_kwh_doc: Option<String>String for documentation – e.g. info about calibration/validation.
fs_kwh_per_kg: f64Fuel specific energy, $\frac{kWh}{kg}$
fs_kwh_per_kg_doc: Option<String>String for documentation – e.g. info about calibration/validation.
fc_max_kw: f64Fuel converter peak continuous power, $kW$
fc_max_kw_doc: Option<String>String for documentation – e.g. info about calibration/validation.
fc_pwr_out_perc: Array1<f64>Fuel converter output power percentage map, x values of fc_eff_map
fc_pwr_out_perc_doc: Option<String>String for documentation – e.g. info about calibration/validation.
fc_eff_map: Array1<f64>Fuel converter efficiency map
fc_eff_map_doc: Option<String>String for documentation – e.g. info about calibration/validation.
fc_eff_type: StringFuel converter efficiency type, one of [SI, ATKINSON, DIESEL, H2FC, HD_DIESEL] Used for calculating fc_eff_map, and other calculations if H2FC
fc_eff_type_doc: Option<String>String for documentation – e.g. info about calibration/validation.
fc_sec_to_peak_pwr: f64Fuel converter time to peak power, $s$
fc_sec_to_peak_pwr_doc: Option<String>String for documentation – e.g. info about calibration/validation.
fc_base_kg: f64Fuel converter base mass, $kg$
fc_base_kg_doc: Option<String>String for documentation – e.g. info about calibration/validation.
fc_kw_per_kg: f64Fuel converter specific power (power-to-weight ratio), $\frac{kW}{kg}$
fc_kw_per_kg_doc: Option<String>String for documentation – e.g. info about calibration/validation.
min_fc_time_on: f64Minimum time fuel converter must be on before shutoff (for HEV, PHEV)
min_fc_time_on_doc: Option<String>String for documentation – e.g. info about calibration/validation.
idle_fc_kw: f64Fuel converter idle power, $kW$
idle_fc_kw_doc: Option<String>String for documentation – e.g. info about calibration/validation.
mc_max_kw: f64Peak continuous electric motor power, $kW$
mc_max_kw_doc: Option<String>String for documentation – e.g. info about calibration/validation.
mc_pwr_out_perc: Array1<f64>Electric motor output power percentage map, x values of mc_eff_map
mc_pwr_out_perc_doc: Option<String>String for documentation – e.g. info about calibration/validation.
mc_eff_map: Array1<f64>Electric motor efficiency map
mc_eff_map_doc: Option<String>String for documentation – e.g. info about calibration/validation.
mc_sec_to_peak_pwr: f64Electric motor time to peak power, $s$
mc_sec_to_peak_pwr_doc: Option<String>String for documentation – e.g. info about calibration/validation.
mc_pe_kg_per_kw: f64Motor power electronics mass per power output, $\frac{kg}{kW}$
mc_pe_kg_per_kw_doc: Option<String>String for documentation – e.g. info about calibration/validation.
mc_pe_base_kg: f64Motor power electronics base mass, $kg$
mc_pe_base_kg_doc: Option<String>String for documentation – e.g. info about calibration/validation.
ess_max_kw: f64Traction battery maximum power output, $kW$
ess_max_kw_doc: Option<String>String for documentation – e.g. info about calibration/validation.
ess_max_kwh: f64Traction battery energy capacity, $kWh$
ess_max_kwh_doc: Option<String>String for documentation – e.g. info about calibration/validation.
ess_kg_per_kwh: f64Traction battery mass per energy, $\frac{kg}{kWh}$
ess_kg_per_kwh_doc: Option<String>String for documentation – e.g. info about calibration/validation.
ess_base_kg: f64Traction battery base mass, $kg$
ess_base_kg_doc: Option<String>String for documentation – e.g. info about calibration/validation.
ess_round_trip_eff: f64Traction battery round-trip efficiency
ess_round_trip_eff_doc: Option<String>String for documentation – e.g. info about calibration/validation.
ess_life_coef_a: f64Traction battery cycle life coefficient A, see reference
ess_life_coef_a_doc: Option<String>String for documentation – e.g. info about calibration/validation.
ess_life_coef_b: f64Traction battery cycle life coefficient B, see reference
ess_life_coef_b_doc: Option<String>String for documentation – e.g. info about calibration/validation.
min_soc: f64Traction battery minimum state of charge
min_soc_doc: Option<String>String for documentation – e.g. info about calibration/validation.
max_soc: f64Traction battery maximum state of charge
max_soc_doc: Option<String>String for documentation – e.g. info about calibration/validation.
ess_dischg_to_fc_max_eff_perc: f64ESS discharge effort toward max FC efficiency
ess_dischg_to_fc_max_eff_perc_doc: Option<String>String for documentation – e.g. info about calibration/validation.
ess_chg_to_fc_max_eff_perc: f64ESS charge effort toward max FC efficiency
ess_chg_to_fc_max_eff_perc_doc: Option<String>String for documentation – e.g. info about calibration/validation.
wheel_inertia_kg_m2: f64Mass moment of inertia per wheel, $kg \cdot m^2$
wheel_inertia_kg_m2_doc: Option<String>String for documentation – e.g. info about calibration/validation.
num_wheels: f64Number of wheels
num_wheels_doc: Option<String>String for documentation – e.g. info about calibration/validation.
wheel_rr_coef: f64Rolling resistance coefficient
wheel_rr_coef_doc: Option<String>String for documentation – e.g. info about calibration/validation.
wheel_radius_m: f64Wheel radius, $m$
wheel_radius_m_doc: Option<String>String for documentation – e.g. info about calibration/validation.
wheel_coef_of_fric: f64Wheel coefficient of friction
wheel_coef_of_fric_doc: Option<String>String for documentation – e.g. info about calibration/validation.
max_accel_buffer_mph: f64Speed where the battery reserved for accelerating is zero
max_accel_buffer_mph_doc: Option<String>String for documentation – e.g. info about calibration/validation.
max_accel_buffer_perc_of_useable_soc: f64Percent of usable battery energy reserved to help accelerate
max_accel_buffer_perc_of_useable_soc_doc: Option<String>String for documentation – e.g. info about calibration/validation.
perc_high_acc_buf: f64Percent SOC buffer for high accessory loads during cycles with long idle time
perc_high_acc_buf_doc: Option<String>String for documentation – e.g. info about calibration/validation.
mph_fc_on: f64Speed at which the fuel converter must turn on, $mph$
mph_fc_on_doc: Option<String>String for documentation – e.g. info about calibration/validation.
kw_demand_fc_on: f64Power demand above which to require fuel converter on, $kW$
kw_demand_fc_on_doc: Option<String>String for documentation – e.g. info about calibration/validation.
max_regen: f64Maximum brake regeneration efficiency
max_regen_doc: Option<String>String for documentation – e.g. info about calibration/validation.
stop_start: boolStop/start micro-HEV flag
stop_start_doc: Option<String>String for documentation – e.g. info about calibration/validation.
force_aux_on_fc: boolForce auxiliary power load to come from fuel converter
force_aux_on_fc_doc: Option<String>String for documentation – e.g. info about calibration/validation.
alt_eff: f64Alternator efficiency
alt_eff_doc: Option<String>String for documentation – e.g. info about calibration/validation.
chg_eff: f64Charger efficiency
chg_eff_doc: Option<String>String for documentation – e.g. info about calibration/validation.
aux_kw: f64Auxiliary load power, $kW$
aux_kw_doc: Option<String>String for documentation – e.g. info about calibration/validation.
trans_kg: f64Transmission mass, $kg$
trans_kg_doc: Option<String>String for documentation – e.g. info about calibration/validation.
trans_eff: f64Transmission efficiency
trans_eff_doc: Option<String>String for documentation – e.g. info about calibration/validation.
ess_to_fuel_ok_error: f64Maximum acceptable ratio of change in ESS energy to expended fuel energy (used in hybrid SOC balancing), $\frac{\Delta E_{ESS}}{\Delta E_{fuel}}$
ess_to_fuel_ok_error_doc: Option<String>String for documentation – e.g. info about calibration/validation.
fc_peak_eff_override: Option<f64>Fuel converter efficiency peak override, scales entire curve
fc_peak_eff_override_doc: Option<String>String for documentation – e.g. info about calibration/validation.
mc_peak_eff_override: Option<f64>Motor efficiency peak override, scales entire curve
mc_peak_eff_override_doc: Option<String>String for documentation – e.g. info about calibration/validation.
Implementations§
Source§impl RustVehicle
RustVehicle rust methods
impl RustVehicle
RustVehicle rust methods
Sourcepub fn set_veh_mass(&mut self)
pub fn set_veh_mass(&mut self)
Sets the following parameters:
ess_mass_kgmc_mass_kgfc_mass_kgfs_mass_kgveh_kgmax_trac_mps2
pub fn mc_peak_eff(&self) -> f64
Sourcepub fn max_fc_eff_kw(&self) -> f64
pub fn max_fc_eff_kw(&self) -> f64
Returns first FC output power at which peak efficiency occurs
pub fn fc_peak_eff(&self) -> f64
pub fn set_mc_peak_eff(&mut self, new_peak: f64)
Sourcepub fn get_mc_eff_min(&self) -> Result<&f64>
pub fn get_mc_eff_min(&self) -> Result<&f64>
Gets the minimum value of mc_eff_array
Sourcepub fn get_mc_eff_max(&self) -> Result<&f64>
pub fn get_mc_eff_max(&self) -> Result<&f64>
Gets the max value of mc_eff_array
Sourcepub fn get_mc_eff_range(&self) -> Result<f64>
pub fn get_mc_eff_range(&self) -> Result<f64>
Gets the range of mc_eff_array
Sourcepub fn set_mc_eff_range(&mut self, new_range: f64) -> Result<()>
pub fn set_mc_eff_range(&mut self, new_range: f64) -> Result<()>
Changes the range (max value - min value) of mc_eff_map and mc_eff_array
§Arguments
- new_range: new range for the mc_eff_map and mc_eff_array
Sourcepub fn get_fc_eff_min(&self) -> Result<f64>
pub fn get_fc_eff_min(&self) -> Result<f64>
Gets the minimum value of fc_eff_array
Sourcepub fn get_fc_eff_max(&self) -> Result<f64>
pub fn get_fc_eff_max(&self) -> Result<f64>
Gets the max value of fc_eff_array
Sourcepub fn get_fc_eff_range(&self) -> Result<f64>
pub fn get_fc_eff_range(&self) -> Result<f64>
Gets the range of fc_eff_array
Sourcepub fn set_fc_eff_range(&mut self, new_range: f64) -> Result<()>
pub fn set_fc_eff_range(&mut self, new_range: f64) -> Result<()>
Changes the range (max value - min value) of fc_eff_map and fc_eff_array
§Arguments
- new_range: new range for the fc_eff_map and fc_eff_array
pub fn set_fc_peak_eff(&mut self, new_peak: f64)
Sourcepub fn set_derived(&mut self) -> Result<()>
pub fn set_derived(&mut self) -> Result<()>
Sets derived parameters:
no_elec_sysno_elec_auxfc_perc_out_arrayinput_kw_out_arrayfc_kw_out_arrayfc_eff_arraymodern_difflarge_baseline_eff_adjmc_kw_adj_percmc_eff_mapmc_eff_arraymc_perc_out_arraymc_kw_out_arraymc_full_eff_arraymc_kw_in_arraymc_max_elec_in_kwset_fc_peak_eff()set_mc_peak_eff()set_veh_mass()ess_mass_kgmc_mass_kgfc_mass_kgfs_mass_kgveh_kgmax_trac_mps2
pub fn mock_vehicle() -> Self
Sourcepub fn from_github_or_url<S: AsRef<str>>(
vehicle_file_name: S,
url: Option<S>,
) -> Result<Self>
pub fn from_github_or_url<S: AsRef<str>>( vehicle_file_name: S, url: Option<S>, ) -> Result<Self>
Downloads specified vehicle from FASTSim vehicle repo or url and instantiates it into a RustVehicle. Notes in vehicle.doc the origin of the vehicle. Returns vehicle.
§Arguments
- vehicle_file_name: file name for vehicle to be downloaded, including path from url directory or FASTSim repository (if applicable)
- url: url for vehicle repository where vehicle will be downloaded from, if None, assumed to be downloaded from vehicle FASTSim repo
Note: The URL needs to be a URL pointing directly to a file, for example
a raw github URL, split up so that the “url” argument is the path to the
directory, and the “vehicle_file_name” is the path within the directory
to the file.
Note: If downloading from the FASTSim Vehicle Repo, the
vehicle_file_name should include the path to the file from the root of
the Repo, as listed in the output of the
vehicle_utils::fetch_github_list() function.
Note: the url should not include the file name, only the path to the
file or a root directory of the file.
Trait Implementations§
Source§impl ApproxEq for RustVehicle
impl ApproxEq for RustVehicle
Source§impl Clone for RustVehicle
impl Clone for RustVehicle
Source§fn clone(&self) -> RustVehicle
fn clone(&self) -> RustVehicle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RustVehicle
impl Debug for RustVehicle
Source§impl Default for RustVehicle
impl Default for RustVehicle
Source§impl<'de> Deserialize<'de> for RustVehicle
impl<'de> Deserialize<'de> for RustVehicle
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 RustVehicle
impl PartialEq for RustVehicle
Source§impl SerdeAPI for RustVehicle
impl SerdeAPI for RustVehicle
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 a vehicle from a url, and notes in vehicle.doc the origin
of the vehicle.
accepts yaml and json file types
§Arguments
- url: URL (either as a string or url type) to object
Note: The URL needs to be a URL pointing directly to a file, for example a raw github URL.
const RESOURCE_PREFIX: &'static str = "vehicles"
const CACHE_FOLDER: &'static str = "vehicles"
const ACCEPTED_BYTE_FORMATS: &'static [&'static str] = _
const ACCEPTED_STR_FORMATS: &'static [&'static str] = _
Source§fn list_resources() -> Vec<String>
fn list_resources() -> Vec<String>
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>
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, skip_init: bool) -> Result<Self>
fn from_file<P: AsRef<Path>>(filepath: P, skip_init: bool) -> 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,
skip_init: bool,
) -> Result<Self>
fn from_str<S: AsRef<str>>( contents: S, format: &str, skip_init: bool, ) -> Result<Self>
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>
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>
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>
fn to_toml(&self) -> Result<String>
fn from_toml<S: AsRef<str>>(toml_str: S, skip_init: bool) -> 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
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>
Source§impl Serialize for RustVehicle
impl Serialize for RustVehicle
Source§impl Validate for RustVehicle
impl Validate for RustVehicle
Source§impl<'v_a> ValidateArgs<'v_a> for RustVehicle
impl<'v_a> ValidateArgs<'v_a> for RustVehicle
impl StructuralPartialEq for RustVehicle
Auto Trait Implementations§
impl Freeze for RustVehicle
impl RefUnwindSafe for RustVehicle
impl Send for RustVehicle
impl Sync for RustVehicle
impl Unpin for RustVehicle
impl UnwindSafe for RustVehicle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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