Memory

Struct Memory 

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

Memory 节点,描述物理内存布局

Implementations§

Source§

impl<'a> Memory<'a>

Source

pub fn regions(&self) -> impl Iterator<Item = MemoryRegion> + 'a

获取内存区域迭代器

Memory 节点的 reg 属性描述了物理内存的布局

Source

pub fn regions_array<const N: usize>(&self) -> Vec<MemoryRegion, N>

获取所有内存区域(使用固定大小数组)

Source

pub fn total_size(&self) -> u64

计算总内存大小

Methods from Deref<Target = NodeBase<'a>>§

Source

pub fn name(&self) -> &'a str

Source

pub fn level(&self) -> usize

Source

pub fn properties(&self) -> PropIter<'a>

获取节点属性迭代器

Source

pub fn find_property(&self, name: &str) -> Option<Property<'a>>

查找指定名称的属性

Source

pub fn find_property_str(&self, name: &str) -> Option<&'a str>

查找指定名称的字符串属性

Source

pub fn reg(&self) -> Option<RegIter<'a>>

查找并解析 reg 属性,返回 Reg 迭代器

Source

pub fn reg_array<const N: usize>(&self) -> Vec<RegInfo, N>

查找并解析 reg 属性,返回所有 RegInfo 条目

Trait Implementations§

Source§

impl<'a> Clone for Memory<'a>

Source§

fn clone(&self) -> Memory<'a>

Returns a duplicate of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Memory<'_>

Source§

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

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

impl<'a> Deref for Memory<'a>

Source§

type Target = NodeBase<'a>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<'a> Freeze for Memory<'a>

§

impl<'a> RefUnwindSafe for Memory<'a>

§

impl<'a> Send for Memory<'a>

§

impl<'a> Sync for Memory<'a>

§

impl<'a> Unpin for Memory<'a>

§

impl<'a> UnwindSafe for Memory<'a>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

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
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.