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: IntoBytes + Immutable>(&mut self, value: T)
pub fn append_slice(&mut self, value: &[u8])
sourcepub fn read<T: FromBytes + Default>(&self, offset: usize) -> T
pub fn read<T: FromBytes + Default>(&self, offset: usize) -> T
Read a value at the given offset
sourcepub fn write<T: IntoBytes + Immutable>(&mut self, offset: usize, value: T)
pub fn write<T: IntoBytes + Immutable>(&mut self, offset: usize, value: T)
Write a value at the given offset
pub fn len(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SDT
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)