pub struct AddressSpace { /* private fields */ }Expand description
A named address space. A processor driver declares which spaces exist (see
Platform::regions). A space is just
its name, so a caller can introduce its own without touching this crate.
The name is stored inline (up to CAP bytes), keeping the type
Copy and cheap as a map key. The empty name is the default space.
Implementations§
Source§impl AddressSpace
impl AddressSpace
Sourcepub const fn new(name: &str) -> Self
pub const fn new(name: &str) -> Self
Construct a space from its name. Panics if longer than CAP.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Whether this is the default (unnamed) space.
Sourcepub fn dsl_addr(&self, offset: AddressValue) -> String
pub fn dsl_addr(&self, offset: AddressValue) -> String
One address, e.g. CODE:0x95f.
Sourcepub fn dsl_range(&self, start: AddressValue, end: AddressValue) -> String
pub fn dsl_range(&self, start: AddressValue, end: AddressValue) -> String
A half-open range, e.g. CODE:0x2..0x4.
Sourcepub fn dsl_set(&self, start: AddressValue, end: AddressValue) -> String
pub fn dsl_set(&self, start: AddressValue, end: AddressValue) -> String
An address set, e.g. CODE:{0x2..0x4}.
Sourcepub fn from_dsl_name(name: &str) -> Option<Self>
pub fn from_dsl_name(name: &str) -> Option<Self>
Parse a space from its DSL name. Regions are driver-defined, so
any name up to CAP bytes is valid.
Trait Implementations§
Source§impl Clone for AddressSpace
impl Clone for AddressSpace
impl Copy for AddressSpace
Source§impl Debug for AddressSpace
impl Debug for AddressSpace
Source§impl<'de> Deserialize<'de> for AddressSpace
impl<'de> Deserialize<'de> for AddressSpace
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AddressSpace
Source§impl Hash for AddressSpace
impl Hash for AddressSpace
Source§impl Ord for AddressSpace
impl Ord for AddressSpace
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for AddressSpace
impl PartialEq for AddressSpace
Source§impl PartialOrd for AddressSpace
impl PartialOrd for AddressSpace
Source§impl Serialize for AddressSpace
impl Serialize for AddressSpace
impl StructuralPartialEq for AddressSpace
Auto Trait Implementations§
impl Forget for AddressSpace
impl Freeze for AddressSpace
impl Move for AddressSpace
impl RefUnwindSafe for AddressSpace
impl Send for AddressSpace
impl Sync for AddressSpace
impl Unpin for AddressSpace
impl UnsafeUnpin for AddressSpace
impl UnwindSafe for AddressSpace
Blanket Implementations§
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