#[non_exhaustive]#[repr(u32)]pub enum AutosarVersion {
Show 20 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,
}
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
Implementations§
source§impl AutosarVersion
impl AutosarVersion
sourcepub const LATEST: AutosarVersion = AutosarVersion::Autosar_00052
pub const LATEST: AutosarVersion = AutosarVersion::Autosar_00052
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 moresource§impl FromStr for AutosarVersion
impl FromStr for AutosarVersion
source§impl Hash for AutosarVersion
impl Hash for AutosarVersion
source§impl Ord for AutosarVersion
impl Ord for AutosarVersion
source§fn cmp(&self, other: &AutosarVersion) -> Ordering
fn cmp(&self, other: &AutosarVersion) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for AutosarVersion
impl PartialEq for AutosarVersion
source§impl PartialOrd for AutosarVersion
impl PartialOrd for AutosarVersion
impl Copy for AutosarVersion
impl Eq for AutosarVersion
impl StructuralPartialEq for AutosarVersion
Auto Trait Implementations§
impl Freeze for AutosarVersion
impl RefUnwindSafe for AutosarVersion
impl Send for AutosarVersion
impl Sync for AutosarVersion
impl Unpin for AutosarVersion
impl UnwindSafe for AutosarVersion
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)