[][src]Enum aml::value::AmlValue

pub enum AmlValue {
    Boolean(bool),
    Integer(u64),
    String(String),
    Name(Box<AmlValue>),
    OpRegion {
        region: RegionSpace,
        offset: u64,
        length: u64,
    },
    Field {
        region: AmlName,
        flags: FieldFlags,
        offset: u64,
        length: u64,
    },
    Device,
    Method {
        flags: MethodFlags,
        code: Vec<u8>,
    },
    Buffer {
        bytes: Vec<u8>,
        size: u64,
    },
    Processor {
        id: u8,
        pblk_address: u32,
        pblk_len: u8,
    },
    Mutex {
        sync_level: u8,
    },
    Package(Vec<AmlValue>),
}

Variants

Boolean(bool)
Integer(u64)
String(String)
Name(Box<AmlValue>)
OpRegion

Fields of OpRegion

region: RegionSpaceoffset: u64length: u64
Field

Fields of Field

region: AmlNameflags: FieldFlagsoffset: u64length: u64
Device
Method

Fields of Method

flags: MethodFlagscode: Vec<u8>
Buffer

Fields of Buffer

bytes: Vec<u8>size: u64
Processor

Fields of Processor

id: u8pblk_address: u32pblk_len: u8
Mutex

Fields of Mutex

sync_level: u8
Package(Vec<AmlValue>)

Methods

impl AmlValue[src]

pub fn type_of(&self) -> AmlType[src]

Returns the AML type of this value. For Name, this returns the type of the inner value.

pub fn as_bool(&self) -> Result<bool, AmlError>[src]

pub fn as_integer(&self) -> Result<u64, AmlError>[src]

pub fn as_type(&self, desired_type: AmlType) -> Result<AmlValue, AmlError>[src]

Convert this value to a value of the same data, but with the given AML type, if possible, by converting the implicit conversions described in §19.3.5 of the spec.

The implicit conversions applied are: Buffer from: Integer, String, Debug BufferField from: Integer, Buffer, String, Debug DdbHandle from: Integer, Debug FieldUnit from: Integer,Buffer, String, Debug Integer from: Buffer, BufferField, DdbHandle, FieldUnit, String, Debug Package from: Debug String from: Integer, Buffer, Debug

Trait Implementations

impl Clone for AmlValue[src]

impl Debug for AmlValue[src]

impl Eq for AmlValue[src]

impl PartialEq<AmlValue> for AmlValue[src]

impl StructuralEq for AmlValue[src]

impl StructuralPartialEq for AmlValue[src]

Auto Trait Implementations

impl Send for AmlValue

impl Sync for AmlValue

impl Unpin for AmlValue

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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> 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.