#[non_exhaustive]#[repr(u32)]pub enum AutosarVersion {
Show 22 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,
Autosar_00054 = 2_097_152,
}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
Autosar_00054 = 2_097_152
AUTOSAR R25-11 - xsd file name: AUTOSAR_00054.xsd
Implementations§
Source§impl AutosarVersion
impl AutosarVersion
Sourcepub const LATEST: AutosarVersion = AutosarVersion::Autosar_00054
pub const LATEST: AutosarVersion = AutosarVersion::Autosar_00054
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<AutosarVersion>
pub fn from_val(n: u32) -> Option<AutosarVersion>
make an AutosarVersion from a u32 value
All AutosarVersions 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<AutosarVersion>
fn from_i64(n: i64) -> Option<AutosarVersion>
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<AutosarVersion>
fn from_u64(n: u64) -> Option<AutosarVersion>
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§type Err = ParseAutosarVersionError
type Err = ParseAutosarVersionError
Source§fn from_str(
input: &str,
) -> Result<AutosarVersion, <AutosarVersion as FromStr>::Err>
fn from_str( input: &str, ) -> Result<AutosarVersion, <AutosarVersion as FromStr>::Err>
s to return a value of this type. Read moreSource§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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.