Struct HwAddr

Source
pub struct HwAddr<'a> { /* private fields */ }
Expand description

Wrapper structure for a qemu_plugin_hwaddr *

§Safety

This structure is safe to use as long as the pointer is valid. The pointer is always opaque, and therefore may not be dereferenced.

Implementations§

Source§

impl<'a> HwAddr<'a>

Source

pub fn is_io(&self) -> bool

Returns whether the memory operation is to MMIO. Returns false if the operation is to RAM.

Source

pub fn hwaddr(&self) -> u64

Returns the physical address for the memory operation

Source

pub fn device_name(&self) -> Result<Option<String>>

Returns a string representing the device

Trait Implementations§

Source§

impl<'a> From<*mut qemu_plugin_hwaddr> for HwAddr<'a>

Source§

fn from(hwaddr: *mut qemu_plugin_hwaddr) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for HwAddr<'a>

§

impl<'a> RefUnwindSafe for HwAddr<'a>

§

impl<'a> Send for HwAddr<'a>

§

impl<'a> Sync for HwAddr<'a>

§

impl<'a> Unpin for HwAddr<'a>

§

impl<'a> UnwindSafe for HwAddr<'a>

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> 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, 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.