pub enum ElfArchitectureFormat {
Bit32 = 32,
Bit64 = 64,
}Expand description
ELF architecture format.
This enum represents the Class field in the ELF Header.
§Examples
use std::str::FromStr;
use alpm_types::ElfArchitectureFormat;
// create ElfArchitectureFormat from str
assert_eq!(
ElfArchitectureFormat::from_str("32"),
Ok(ElfArchitectureFormat::Bit32)
);
assert_eq!(
ElfArchitectureFormat::from_str("64"),
Ok(ElfArchitectureFormat::Bit64)
);
// format as String
assert_eq!("32", format!("{}", ElfArchitectureFormat::Bit32));
assert_eq!("64", format!("{}", ElfArchitectureFormat::Bit64));Variants§
Trait Implementations§
Source§impl AlpmParser for ElfArchitectureFormat
impl AlpmParser for ElfArchitectureFormat
Source§fn parser(input: &mut &str) -> ModalResult<Self>
fn parser(input: &mut &str) -> ModalResult<Self>
Recognizes an ElfArchitectureFormat in a string slice.
§Errors
Returns an error, if input does not begin with a valid ElfArchitectureFormat.
Source§impl Clone for ElfArchitectureFormat
impl Clone for ElfArchitectureFormat
Source§fn clone(&self) -> ElfArchitectureFormat
fn clone(&self) -> ElfArchitectureFormat
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 ElfArchitectureFormat
impl Debug for ElfArchitectureFormat
Source§impl<'de> Deserialize<'de> for ElfArchitectureFormat
impl<'de> Deserialize<'de> for ElfArchitectureFormat
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 Display for ElfArchitectureFormat
impl Display for ElfArchitectureFormat
Source§impl FromStr for ElfArchitectureFormat
impl FromStr for ElfArchitectureFormat
Source§impl Ord for ElfArchitectureFormat
impl Ord for ElfArchitectureFormat
Source§fn cmp(&self, other: &ElfArchitectureFormat) -> Ordering
fn cmp(&self, other: &ElfArchitectureFormat) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ElfArchitectureFormat
impl PartialEq for ElfArchitectureFormat
Source§fn eq(&self, other: &ElfArchitectureFormat) -> bool
fn eq(&self, other: &ElfArchitectureFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ElfArchitectureFormat
impl PartialOrd for ElfArchitectureFormat
Source§impl Serialize for ElfArchitectureFormat
impl Serialize for ElfArchitectureFormat
Source§impl TryFrom<&str> for ElfArchitectureFormat
impl TryFrom<&str> for ElfArchitectureFormat
impl Copy for ElfArchitectureFormat
impl Eq for ElfArchitectureFormat
impl StructuralPartialEq for ElfArchitectureFormat
Auto Trait Implementations§
impl Freeze for ElfArchitectureFormat
impl RefUnwindSafe for ElfArchitectureFormat
impl Send for ElfArchitectureFormat
impl Sync for ElfArchitectureFormat
impl Unpin for ElfArchitectureFormat
impl UnsafeUnpin for ElfArchitectureFormat
impl UnwindSafe for ElfArchitectureFormat
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<U> ParserUntil for Uwhere
U: AlpmParser,
impl<U> ParserUntil for Uwhere
U: AlpmParser,
Source§fn parser_until<'a, P>(
delimiter: P,
) -> impl Parser<&'a str, U, ErrMode<ContextError>>
fn parser_until<'a, P>( delimiter: P, ) -> impl Parser<&'a str, U, ErrMode<ContextError>>
Returns a [Parser] that parses Self until the given delimiter parser
matches.
§Note
Does not consume the delimiter.
Source§fn parser_until_eof(input: &mut &str) -> Result<Self, ErrMode<ContextError>>
fn parser_until_eof(input: &mut &str) -> Result<Self, ErrMode<ContextError>>
Source§impl<U> ParserUntilInclusive for Uwhere
U: ParserUntil,
impl<U> ParserUntilInclusive for Uwhere
U: ParserUntil,
Source§fn parser_until_inclusive<'a, P>(
delimiter: P,
) -> impl Parser<&'a str, U, ErrMode<ContextError>>
fn parser_until_inclusive<'a, P>( delimiter: P, ) -> impl Parser<&'a str, U, ErrMode<ContextError>>
Returns a [Parser] that parses the whole input and consumes the given delimiter parser.
Delegates to ParserUntil::parser_until and consumes the delimiter.