#[non_exhaustive]#[repr(u32)]pub enum AutosarVersion {
Show 21 variants
Autosar_4_0_1 = 1,
Autosar_4_0_2 = 2,
Autosar_4_0_3 = 4,
Autosar_4_1_1 = 8,
Autosar_4_1_2 = 16,
Autosar_4_1_3 = 32,
Autosar_4_2_1 = 64,
Autosar_4_2_2 = 128,
Autosar_4_3_0 = 256,
Autosar_00042 = 512,
Autosar_00043 = 1_024,
Autosar_00044 = 2_048,
Autosar_00045 = 4_096,
Autosar_00046 = 8_192,
Autosar_00047 = 16_384,
Autosar_00048 = 32_768,
Autosar_00049 = 65_536,
Autosar_00050 = 131_072,
Autosar_00051 = 262_144,
Autosar_00052 = 524_288,
Autosar_00053 = 1_048_576,
}
Expand description
Enum of all Autosar versions
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Autosar_4_0_1 = 1
AUTOSAR 4.0.1 - xsd file name: AUTOSAR_4-0-1.xsd
Autosar_4_0_2 = 2
AUTOSAR 4.0.2 - xsd file name: AUTOSAR_4-0-2.xsd
Autosar_4_0_3 = 4
AUTOSAR 4.0.3 - xsd file name: AUTOSAR_4-0-3.xsd
Autosar_4_1_1 = 8
AUTOSAR 4.1.1 - xsd file name: AUTOSAR_4-1-1.xsd
Autosar_4_1_2 = 16
AUTOSAR 4.1.2 - xsd file name: AUTOSAR_4-1-2.xsd
Autosar_4_1_3 = 32
AUTOSAR 4.1.3 - xsd file name: AUTOSAR_4-1-3.xsd
Autosar_4_2_1 = 64
AUTOSAR 4.2.1 - xsd file name: AUTOSAR_4-2-1.xsd
Autosar_4_2_2 = 128
AUTOSAR 4.2.2 - xsd file name: AUTOSAR_4-2-2.xsd
Autosar_4_3_0 = 256
AUTOSAR 4.3.0 - xsd file name: AUTOSAR_4-3-0.xsd
Autosar_00042 = 512
AUTOSAR Adaptive 17-03 - xsd file name: AUTOSAR_00042.xsd
Autosar_00043 = 1_024
AUTOSAR Adaptive 17-10 - xsd file name: AUTOSAR_00043.xsd
Autosar_00044 = 2_048
AUTOSAR Classic 4.3.1 - xsd file name: AUTOSAR_00044.xsd
Autosar_00045 = 4_096
AUTOSAR Adaptive 18-03 - xsd file name: AUTOSAR_00045.xsd
Autosar_00046 = 8_192
AUTOSAR Classic 4.4.0 / Adaptive 18-10 - xsd file name: AUTOSAR_00046.xsd
Autosar_00047 = 16_384
AUTOSAR Adaptive 19-03 - xsd file name: AUTOSAR_00047.xsd
Autosar_00048 = 32_768
AUTOSAR 4.5.0 - xsd file name: AUTOSAR_00048.xsd
Autosar_00049 = 65_536
AUTOSAR R20-11 - xsd file name: AUTOSAR_00049.xsd
Autosar_00050 = 131_072
AUTOSAR R21-11 - xsd file name: AUTOSAR_00050.xsd
Autosar_00051 = 262_144
AUTOSAR R22-11 - xsd file name: AUTOSAR_00051.xsd
Autosar_00052 = 524_288
AUTOSAR R23-11 - xsd file name: AUTOSAR_00052.xsd
Autosar_00053 = 1_048_576
AUTOSAR R24-11 - xsd file name: AUTOSAR_00053.xsd
Implementations§
Source§impl AutosarVersion
impl AutosarVersion
Sourcepub const LATEST: AutosarVersion = AutosarVersion::Autosar_00053
pub const LATEST: AutosarVersion = AutosarVersion::Autosar_00053
AutosarVersion::LATEST
is an alias of which ever is the latest version
Sourcepub fn filename(&self) -> &'static str
pub fn filename(&self) -> &'static str
get the name of the xsd file matching the Autosar version
Sourcepub fn describe(&self) -> &'static str
pub fn describe(&self) -> &'static str
Human readable description of the Autosar version
This is particularly useful for the later versions, where the xsd files are just sequentially numbered.
For example Autosar_00050
-> “AUTOSAR R21-11”
Sourcepub fn from_val(n: u32) -> Option<Self>
pub fn from_val(n: u32) -> Option<Self>
make an AutosarVersion
from a u32 value
All AutosarVersion
s are associated with a power of two u32 value, for example Autosar_4_3_0
== 0x100
If the given value is a valid constant of AutosarVersion
, the enum value will be returnd
This is useful in order to decode version masks
Source§impl AutosarVersion
impl AutosarVersion
pub fn compatible(&self, version_mask: u32) -> bool
Trait Implementations§
Source§impl Clone for AutosarVersion
impl Clone for AutosarVersion
Source§fn clone(&self) -> AutosarVersion
fn clone(&self) -> AutosarVersion
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AutosarVersion
impl Debug for AutosarVersion
Source§impl Display for AutosarVersion
impl Display for AutosarVersion
Source§impl FromPrimitive for AutosarVersion
impl FromPrimitive for AutosarVersion
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more