pub struct Memory<'a> { /* private fields */ }Expand description
Memory 节点,描述物理内存布局
Implementations§
Source§impl<'a> Memory<'a>
impl<'a> Memory<'a>
Sourcepub fn regions(&self) -> impl Iterator<Item = MemoryRegion> + 'a
pub fn regions(&self) -> impl Iterator<Item = MemoryRegion> + 'a
获取内存区域迭代器
Memory 节点的 reg 属性描述了物理内存的布局
Sourcepub fn regions_array<const N: usize>(&self) -> Vec<MemoryRegion, N>
pub fn regions_array<const N: usize>(&self) -> Vec<MemoryRegion, N>
获取所有内存区域(使用固定大小数组)
Sourcepub fn total_size(&self) -> u64
pub fn total_size(&self) -> u64
计算总内存大小
Methods from Deref<Target = NodeBase<'a>>§
pub fn name(&self) -> &'a str
pub fn level(&self) -> usize
Sourcepub fn properties(&self) -> PropIter<'a> ⓘ
pub fn properties(&self) -> PropIter<'a> ⓘ
获取节点属性迭代器
Sourcepub fn find_property(&self, name: &str) -> Option<Property<'a>>
pub fn find_property(&self, name: &str) -> Option<Property<'a>>
查找指定名称的属性
Sourcepub fn find_property_str(&self, name: &str) -> Option<&'a str>
pub fn find_property_str(&self, name: &str) -> Option<&'a str>
查找指定名称的字符串属性
pub fn ranges(&self) -> Option<VecRange<'a>>
Trait Implementations§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)