pub struct IndexEntryV1 {
pub path: String,
pub id: String,
pub fastsim_version: u32,
pub powertrain: String,
pub make: String,
pub model: String,
pub year: String,
pub variant: String,
pub revision: u32,
}Expand description
A single entry in the vehicle index (i.e. vehicles.jsonl).
Every field except path is redundant with id and exists
only so consumers can filter without re-parsing id themselves.
Fields§
§path: String§id: String§fastsim_version: u32§powertrain: String§make: String§model: String§year: String§variant: String§revision: u32Trait Implementations§
Source§impl Clone for IndexEntryV1
impl Clone for IndexEntryV1
Source§fn clone(&self) -> IndexEntryV1
fn clone(&self) -> IndexEntryV1
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexEntryV1
impl Debug for IndexEntryV1
Source§impl<'de> Deserialize<'de> for IndexEntryV1
impl<'de> Deserialize<'de> for IndexEntryV1
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 FromStr for IndexEntryV1
impl FromStr for IndexEntryV1
Source§fn from_str(path: &str) -> Result<Self, Self::Err>
fn from_str(path: &str) -> Result<Self, Self::Err>
Parse an entry from a repository-relative file path including its extension
(e.g. "v1/fastsim-3/conv/ford/fusion/2012/base/r1.yaml").
The path minus its extension is parsed and canonically validated as a
VehicleSchemaV1 id — an IndexEntryV1 can only be constructed from a path
that’s already valid, so no separate validation step is needed by
callers building an index from a directory scan.
§Errors
Returns VehicleSchemaV1Error if the path (minus extension) isn’t a valid,
canonical v1 schema path.
Source§type Err = VehicleSchemaV1Error
type Err = VehicleSchemaV1Error
The associated error which can be returned from parsing.
Source§impl PartialEq for IndexEntryV1
impl PartialEq for IndexEntryV1
Source§impl Serialize for IndexEntryV1
impl Serialize for IndexEntryV1
impl StructuralPartialEq for IndexEntryV1
Auto Trait Implementations§
impl Freeze for IndexEntryV1
impl RefUnwindSafe for IndexEntryV1
impl Send for IndexEntryV1
impl Sync for IndexEntryV1
impl Unpin for IndexEntryV1
impl UnsafeUnpin for IndexEntryV1
impl UnwindSafe for IndexEntryV1
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