Struct acpi_tables::sdt::SDT
source · pub struct SDT {
data: Vec<u8>,
}
Expand description
SDT represents for System Description Table. The structure SDT is a generic format for creating various ACPI tables like DSDT/FADT/MADT.
Fields§
§data: Vec<u8>
Implementations§
source§impl SDT
impl SDT
sourcepub fn new(
signature: [u8; 4],
length: u32,
revision: u8,
oem_id: [u8; 6],
oem_table: [u8; 8],
oem_revision: u32
) -> Self
pub fn new( signature: [u8; 4], length: u32, revision: u8, oem_id: [u8; 6], oem_table: [u8; 8], oem_revision: u32 ) -> Self
Set up the ACPI table header at the front of the SDT. The arguments correspond to the elements in the ACPI table headers.
sourcepub fn from_file(path: &Path) -> Result<Self>
pub fn from_file(path: &Path) -> Result<Self>
Set up the ACPI table from file content. Verify file checksum.
pub fn is_signature(&self, signature: &[u8; 4]) -> bool
fn update_checksum(&mut self)
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn append<T: AsBytes>(&mut self, value: T)
pub fn append_slice(&mut self, value: &[u8])
sourcepub fn read<T: FromBytes + AsBytes + Default>(&self, offset: usize) -> T
pub fn read<T: FromBytes + AsBytes + Default>(&self, offset: usize) -> T
Read a value at the given offset
pub fn len(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for SDT
impl Send for SDT
impl Sync for SDT
impl Unpin for SDT
impl UnwindSafe for SDT
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