[][src]Struct aml::AmlName

pub struct AmlName(_);

Methods

impl AmlName[src]

pub fn root() -> AmlName[src]

pub fn from_name_seg(seg: NameSeg) -> AmlName[src]

pub fn from_str(string: &str) -> Option<AmlName>[src]

Convert a string representation of an AML name into an AmlName. Returns None if the passed string is not a valid AML path.

pub fn as_string(&self) -> String[src]

pub fn is_normal(&self) -> bool[src]

An AML path is normal if it does not contain any prefix elements ("^" characters, when expressed as a string).

pub fn is_absolute(&self) -> bool[src]

pub fn search_rules_apply(&self) -> bool[src]

Special rules apply when searching for certain paths (specifically, those that are made up of a single name segment). Returns true if those rules apply.

pub fn normalize(self) -> Result<AmlName, AmlError>[src]

Normalize an AML path, resolving prefix chars. Returns None if the path normalizes to an invalid path (e.g. \^_FOO)

pub fn parent(&self) -> Result<AmlName, AmlError>[src]

Get the parent of this AmlName. For example, the parent of \_SB.PCI0._PRT is \_SB.PCI0. The root path has no parent, and so returns None.

pub fn resolve(&self, scope: &AmlName) -> Result<AmlName, AmlError>[src]

Resolve this path against a given scope, making it absolute. If the path is absolute, it is returned directly. The path is also normalized.

Trait Implementations

impl Debug for AmlName[src]

impl Display for AmlName[src]

impl PartialEq<AmlName> for AmlName[src]

impl Eq for AmlName[src]

impl Ord for AmlName[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<AmlName> for AmlName[src]

impl Clone for AmlName[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Unpin for AmlName

impl Sync for AmlName

impl Send for AmlName

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]