pub struct VolatilityStruct { /* private fields */ }Expand description
An opaque type representing the layout of a given type within the guest OS
Can be obtained via the type_from_name function.
Note: This type is opaque due to having an undefined layout and thus may only be accessed behind a reference.
Implementations§
Source§impl VolatilityStruct
impl VolatilityStruct
Sourcepub fn size(&self) -> target_ulong
pub fn size(&self) -> target_ulong
Get the size of the given type in bytes
Sourcepub fn offset_of(&self, field: &str) -> target_long
pub fn offset_of(&self, field: &str) -> target_long
Get the offset of a given field within the structure given the name of the field
Sourcepub fn type_of(&self, field: &str) -> String
pub fn type_of(&self, field: &str) -> String
Get the type of a given field within the structure given the name of the field
Sourcepub fn name(&self) -> String
pub fn name(&self) -> String
Get the name of a the struct
Note: this requires an O(n) reverse lookup and is not efficient. Limit usage when possible.
Sourcepub fn fields(&self) -> VolatilityFieldIter<'_> ⓘ
pub fn fields(&self) -> VolatilityFieldIter<'_> ⓘ
Iterate over the fields of the given struct
Auto Trait Implementations§
impl Freeze for VolatilityStruct
impl RefUnwindSafe for VolatilityStruct
impl !Send for VolatilityStruct
impl !Sync for VolatilityStruct
impl !Unpin for VolatilityStruct
impl UnwindSafe for VolatilityStruct
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