Skip to main content

RFlags

Struct RFlags 

Source
pub struct RFlags(/* private fields */);

Implementations§

Source§

impl RFlags

Source

pub const fn new() -> Self

Creates a new default initialized bitfield.

Source

pub const fn from_bits(bits: u64) -> Self

Convert from bits.

Source

pub const fn into_bits(self) -> u64

Convert into bits.

Source

pub const fn carry(&self) -> bool

Bits: 0..1

Source

pub const fn with_carry_checked(self, value: bool) -> Result<Self, ()>

Bits: 0..1

Source

pub const fn with_carry(self, value: bool) -> Self

Bits: 0..1

Source

pub const fn set_carry(&mut self, value: bool)

Bits: 0..1

Source

pub const fn set_carry_checked(&mut self, value: bool) -> Result<(), ()>

Bits: 0..1

Source

pub const fn reserved_must_be_1(&self) -> bool

Bits: 1..2

Source

pub const fn with_reserved_must_be_1_checked( self, value: bool, ) -> Result<Self, ()>

Bits: 1..2

Source

pub const fn with_reserved_must_be_1(self, value: bool) -> Self

Bits: 1..2

Source

pub const fn set_reserved_must_be_1(&mut self, value: bool)

Bits: 1..2

Source

pub const fn set_reserved_must_be_1_checked( &mut self, value: bool, ) -> Result<(), ()>

Bits: 1..2

Source

pub const fn parity(&self) -> bool

Bits: 2..3

Source

pub const fn with_parity_checked(self, value: bool) -> Result<Self, ()>

Bits: 2..3

Source

pub const fn with_parity(self, value: bool) -> Self

Bits: 2..3

Source

pub const fn set_parity(&mut self, value: bool)

Bits: 2..3

Source

pub const fn set_parity_checked(&mut self, value: bool) -> Result<(), ()>

Bits: 2..3

Source

pub const fn adjust(&self) -> bool

Bits: 4..5

Source

pub const fn with_adjust_checked(self, value: bool) -> Result<Self, ()>

Bits: 4..5

Source

pub const fn with_adjust(self, value: bool) -> Self

Bits: 4..5

Source

pub const fn set_adjust(&mut self, value: bool)

Bits: 4..5

Source

pub const fn set_adjust_checked(&mut self, value: bool) -> Result<(), ()>

Bits: 4..5

Source

pub const fn zero(&self) -> bool

Bits: 6..7

Source

pub const fn with_zero_checked(self, value: bool) -> Result<Self, ()>

Bits: 6..7

Source

pub const fn with_zero(self, value: bool) -> Self

Bits: 6..7

Source

pub const fn set_zero(&mut self, value: bool)

Bits: 6..7

Source

pub const fn set_zero_checked(&mut self, value: bool) -> Result<(), ()>

Bits: 6..7

Source

pub const fn sign(&self) -> bool

Bits: 7..8

Source

pub const fn with_sign_checked(self, value: bool) -> Result<Self, ()>

Bits: 7..8

Source

pub const fn with_sign(self, value: bool) -> Self

Bits: 7..8

Source

pub const fn set_sign(&mut self, value: bool)

Bits: 7..8

Source

pub const fn set_sign_checked(&mut self, value: bool) -> Result<(), ()>

Bits: 7..8

Source

pub const fn trap(&self) -> bool

Bits: 8..9

Source

pub const fn with_trap_checked(self, value: bool) -> Result<Self, ()>

Bits: 8..9

Source

pub const fn with_trap(self, value: bool) -> Self

Bits: 8..9

Source

pub const fn set_trap(&mut self, value: bool)

Bits: 8..9

Source

pub const fn set_trap_checked(&mut self, value: bool) -> Result<(), ()>

Bits: 8..9

Source

pub const fn interrupt_enable(&self) -> bool

Bits: 9..10

Source

pub const fn with_interrupt_enable_checked( self, value: bool, ) -> Result<Self, ()>

Bits: 9..10

Source

pub const fn with_interrupt_enable(self, value: bool) -> Self

Bits: 9..10

Source

pub const fn set_interrupt_enable(&mut self, value: bool)

Bits: 9..10

Source

pub const fn set_interrupt_enable_checked( &mut self, value: bool, ) -> Result<(), ()>

Bits: 9..10

Source

pub const fn direction(&self) -> bool

Bits: 10..11

Source

pub const fn with_direction_checked(self, value: bool) -> Result<Self, ()>

Bits: 10..11

Source

pub const fn with_direction(self, value: bool) -> Self

Bits: 10..11

Source

pub const fn set_direction(&mut self, value: bool)

Bits: 10..11

Source

pub const fn set_direction_checked(&mut self, value: bool) -> Result<(), ()>

Bits: 10..11

Source

pub const fn overflow(&self) -> bool

Bits: 11..12

Source

pub const fn with_overflow_checked(self, value: bool) -> Result<Self, ()>

Bits: 11..12

Source

pub const fn with_overflow(self, value: bool) -> Self

Bits: 11..12

Source

pub const fn set_overflow(&mut self, value: bool)

Bits: 11..12

Source

pub const fn set_overflow_checked(&mut self, value: bool) -> Result<(), ()>

Bits: 11..12

Source

pub const fn io_privilege_level(&self) -> u8

Bits: 12..14

Source

pub const fn with_io_privilege_level_checked( self, value: u8, ) -> Result<Self, ()>

Bits: 12..14

Source

pub const fn with_io_privilege_level(self, value: u8) -> Self

Bits: 12..14

Source

pub const fn set_io_privilege_level(&mut self, value: u8)

Bits: 12..14

Source

pub const fn set_io_privilege_level_checked( &mut self, value: u8, ) -> Result<(), ()>

Bits: 12..14

Source

pub const fn nested_task(&self) -> bool

Bits: 14..15

Source

pub const fn with_nested_task_checked(self, value: bool) -> Result<Self, ()>

Bits: 14..15

Source

pub const fn with_nested_task(self, value: bool) -> Self

Bits: 14..15

Source

pub const fn set_nested_task(&mut self, value: bool)

Bits: 14..15

Source

pub const fn set_nested_task_checked(&mut self, value: bool) -> Result<(), ()>

Bits: 14..15

Source

pub const fn mode(&self) -> bool

Bits: 15..16

Source

pub const fn with_mode_checked(self, value: bool) -> Result<Self, ()>

Bits: 15..16

Source

pub const fn with_mode(self, value: bool) -> Self

Bits: 15..16

Source

pub const fn set_mode(&mut self, value: bool)

Bits: 15..16

Source

pub const fn set_mode_checked(&mut self, value: bool) -> Result<(), ()>

Bits: 15..16

Source

pub const fn resume(&self) -> bool

Bits: 16..17

Source

pub const fn with_resume_checked(self, value: bool) -> Result<Self, ()>

Bits: 16..17

Source

pub const fn with_resume(self, value: bool) -> Self

Bits: 16..17

Source

pub const fn set_resume(&mut self, value: bool)

Bits: 16..17

Source

pub const fn set_resume_checked(&mut self, value: bool) -> Result<(), ()>

Bits: 16..17

Source

pub const fn virtual_8086_mode(&self) -> bool

Bits: 17..18

Source

pub const fn with_virtual_8086_mode_checked( self, value: bool, ) -> Result<Self, ()>

Bits: 17..18

Source

pub const fn with_virtual_8086_mode(self, value: bool) -> Self

Bits: 17..18

Source

pub const fn set_virtual_8086_mode(&mut self, value: bool)

Bits: 17..18

Source

pub const fn set_virtual_8086_mode_checked( &mut self, value: bool, ) -> Result<(), ()>

Bits: 17..18

Source

pub const fn alignment_check(&self) -> bool

Bits: 18..19

Source

pub const fn with_alignment_check_checked(self, value: bool) -> Result<Self, ()>

Bits: 18..19

Source

pub const fn with_alignment_check(self, value: bool) -> Self

Bits: 18..19

Source

pub const fn set_alignment_check(&mut self, value: bool)

Bits: 18..19

Source

pub const fn set_alignment_check_checked( &mut self, value: bool, ) -> Result<(), ()>

Bits: 18..19

Source

pub const fn virtual_interrupt(&self) -> bool

Bits: 19..20

Source

pub const fn with_virtual_interrupt_checked( self, value: bool, ) -> Result<Self, ()>

Bits: 19..20

Source

pub const fn with_virtual_interrupt(self, value: bool) -> Self

Bits: 19..20

Source

pub const fn set_virtual_interrupt(&mut self, value: bool)

Bits: 19..20

Source

pub const fn set_virtual_interrupt_checked( &mut self, value: bool, ) -> Result<(), ()>

Bits: 19..20

Source

pub const fn virtual_interrupt_pending(&self) -> bool

Bits: 20..21

Source

pub const fn with_virtual_interrupt_pending_checked( self, value: bool, ) -> Result<Self, ()>

Bits: 20..21

Source

pub const fn with_virtual_interrupt_pending(self, value: bool) -> Self

Bits: 20..21

Source

pub const fn set_virtual_interrupt_pending(&mut self, value: bool)

Bits: 20..21

Source

pub const fn set_virtual_interrupt_pending_checked( &mut self, value: bool, ) -> Result<(), ()>

Bits: 20..21

Source

pub const fn cpuid_allowed(&self) -> bool

Bits: 21..22

Source

pub const fn with_cpuid_allowed_checked(self, value: bool) -> Result<Self, ()>

Bits: 21..22

Source

pub const fn with_cpuid_allowed(self, value: bool) -> Self

Bits: 21..22

Source

pub const fn set_cpuid_allowed(&mut self, value: bool)

Bits: 21..22

Source

pub const fn set_cpuid_allowed_checked(&mut self, value: bool) -> Result<(), ()>

Bits: 21..22

Source

pub const fn aes_key_schedule_loaded(&self) -> bool

Bits: 30..31

Source

pub const fn with_aes_key_schedule_loaded_checked( self, value: bool, ) -> Result<Self, ()>

Bits: 30..31

Source

pub const fn with_aes_key_schedule_loaded(self, value: bool) -> Self

Bits: 30..31

Source

pub const fn set_aes_key_schedule_loaded(&mut self, value: bool)

Bits: 30..31

Source

pub const fn set_aes_key_schedule_loaded_checked( &mut self, value: bool, ) -> Result<(), ()>

Bits: 30..31

Source§

impl RFlags

Source

pub fn at_reset() -> Self

Returns the reset value of the RFLAGS register.

Trait Implementations§

Source§

impl<'a> Arbitrary<'a> for RFlags

Available on crate feature arbitrary only.
Source§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
§

fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
Source§

impl BitAnd for RFlags

Source§

type Output = RFlags

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: RFlags) -> Self::Output

Performs the & operation. Read more
Source§

impl Clone for RFlags

Source§

fn clone(&self) -> RFlags

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<RFlags> for u64

Source§

fn from(v: RFlags) -> u64

Converts to this type from the input type.
Source§

impl From<u64> for RFlags

Source§

fn from(v: u64) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for RFlags

Source§

fn eq(&self, other: &RFlags) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for RFlags

Source§

impl StructuralPartialEq for RFlags

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.