[][src]Enum aml::AmlError

pub enum AmlError {
    UnexpectedEndOfStream,
    UnexpectedByte(u8),
    InvalidNameSeg([u8; 4]),
    InvalidFieldFlags,
    IncompatibleValueConversion,
    UnterminatedStringConstant,
    InvalidStringConstant,
    InvalidRegionSpace(u8),
    WrongParser,
    InvalidNormalizedName(String),
    RootHasNoParent,
    ObjectDoesNotExist(String),
    HandleDoesNotExist(AmlHandle),
    NameCollision(AmlName),
    InvalidArgumentAccess(u8),
    InvalidLocalAccess(u8),
    Return(AmlValue),
}

Variants

UnexpectedEndOfStreamUnexpectedByte(u8)InvalidNameSeg([u8; 4])InvalidFieldFlagsIncompatibleValueConversionUnterminatedStringConstantInvalidStringConstantInvalidRegionSpace(u8)WrongParser

Emitted by a parser when it's clear that the stream doesn't encode the object parsed by that parser (e.g. the wrong opcode starts the stream). This is handled specially by some parsers such as or and choice!.

InvalidNormalizedName(String)

Produced when trying to normalize a path that does not point to a valid level of the namespace. E.g. \_SB.^^PCI0 goes above the root of the namespace.

RootHasNoParentObjectDoesNotExist(String)

Produced when a path is given that does not point to an object in the AML namespace.

HandleDoesNotExist(AmlHandle)NameCollision(AmlName)

Produced when two values with the same name are added to the namespace.

InvalidArgumentAccess(u8)

Produced when a method accesses an argument it does not have (e.g. a method that takes 2 arguments accesses Arg4). The inner value is the number of the argument accessed. If any arguments are accessed when a method is not being executed, this error is produced with an argument number of 0xff.

InvalidLocalAccess(u8)Return(AmlValue)

This is not a real error, but is used to propagate return values from within the deep parsing call-stack. It should only be emitted when parsing a DefReturn. We use the error system here because the way errors are propagated matches how we want to handle return values.

Trait Implementations

impl Debug for AmlError[src]

impl PartialEq<AmlError> for AmlError[src]

impl Eq for AmlError[src]

impl Clone for AmlError[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 AmlError

impl Sync for AmlError

impl Send for AmlError

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.