pub enum BodyType {
Show 39 variants
Saloon,
Hatchback,
StationWagon,
Coupe,
Convertible,
MultiPurpose,
TruckStationWagon,
Lorry,
Van,
TractorUnit,
RoadTractor,
PickUp,
ChassisCab,
SingleDeckBus,
DoubleDeckBus,
ArticulatedSingleDeckBus,
ArticulatedDoubleDeckBus,
LowFloorSingleDeckBus,
LowFloorDoubleDeckBus,
ArticulatedLowFloorSingleDeckBus,
ArticulatedLowFloorDoubleDeckBus,
OpenTopSingleDeckBus,
OpenTopDoubleDeckBus,
BusChassis,
SemiTrailer,
DrawbarTrailer,
CentreAxleTrailer,
RigidDrawbarTrailer,
MotorCaravan,
ArmouredVehicle,
Ambulance,
Hearse,
TrailerCaravan,
MobileCrane,
SpecialGroup,
WheelchairAccessible,
ConverterDolly,
ExceptionalLoadTrailer,
Unknown,
}Expand description
Vehicle bodywork type, per the EU type-approval standard — the two-letter codes from Commission Regulation (EU) 678/2011 (consolidated into the framework Reg (EU) 2018/858), the same codes printed on the Certificate of Conformity and recorded by EU national vehicle registers.
This is a bodywork classification, not a market segment. There is
deliberately no SUV / Crossover variant: the standard has none — an
SUV is type-approved as a BodyType::StationWagon (AC) or
BodyType::MultiPurpose (AF). Segment labelling (SUV, city car, …) is
an application-layer concern and is intentionally out of scope.
Variants§
Saloon
Hatchback
StationWagon
Coupe
Convertible
MultiPurpose
TruckStationWagon
Lorry
Van
TractorUnit
RoadTractor
PickUp
ChassisCab
SingleDeckBus
DoubleDeckBus
ArticulatedSingleDeckBus
ArticulatedDoubleDeckBus
LowFloorSingleDeckBus
LowFloorDoubleDeckBus
ArticulatedLowFloorSingleDeckBus
ArticulatedLowFloorDoubleDeckBus
OpenTopSingleDeckBus
OpenTopDoubleDeckBus
BusChassis
SemiTrailer
DrawbarTrailer
CentreAxleTrailer
RigidDrawbarTrailer
MotorCaravan
ArmouredVehicle
Ambulance
Hearse
TrailerCaravan
MobileCrane
SpecialGroup
WheelchairAccessible
ConverterDolly
ExceptionalLoadTrailer
Unknown
Bodywork that maps to no EU type-approval code — e.g. a category L powered two-wheeler, or an unrecognised source string.
Implementations§
Source§impl BodyType
impl BodyType
Sourcepub fn code(self) -> &'static str
pub fn code(self) -> &'static str
The canonical two-letter EU type-approval bodywork code ("AA", "BB",
…). BodyType::Unknown has no code and returns "".
Sourcepub fn from_code(code: &str) -> Option<Self>
pub fn from_code(code: &str) -> Option<Self>
Map a two-letter EU type-approval code (case-insensitive) onto a variant.
Returns None for an unrecognised code. This is the exact path for
registry data that already carries the standard code (e.g. RDW
carrosserietype).
Sourcepub fn parse(s: &str) -> Self
pub fn parse(s: &str) -> Self
Best-effort map of a free-text body-style string — vPIC English, RDW
Dutch inrichting, autoevolution/DBpedia prose — onto the standard
variant. Order matters: more specific substrings win first.
Market-segment words with no bodywork code ("SUV", "crossover",
"CUV") collapse to BodyType::MultiPurpose (AF), the standard’s
closest catch-all for a tall multi-use passenger car. Genuinely
unrecognised input yields BodyType::Unknown.
Trait Implementations§
Source§impl Archive for BodyType
impl Archive for BodyType
Source§type Resolver = BodyTypeResolver
type Resolver = BodyTypeResolver
Source§fn resolve(
&self,
resolver: <Self as Archive>::Resolver,
out: Place<<Self as Archive>::Archived>,
)
fn resolve( &self, resolver: <Self as Archive>::Resolver, out: Place<<Self as Archive>::Archived>, )
Source§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
serialize. Read moreimpl Copy for BodyType
impl Eq for BodyType
impl StructuralPartialEq for BodyType
Auto Trait Implementations§
impl Freeze for BodyType
impl RefUnwindSafe for BodyType
impl Send for BodyType
impl Sync for BodyType
impl Unpin for BodyType
impl UnsafeUnpin for BodyType
impl UnwindSafe for BodyType
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.