Struct direct_storage::DSTORAGE_REQUEST_OPTIONS
source · #[repr(C)]pub struct DSTORAGE_REQUEST_OPTIONS {
pub _bitfield1: u8,
pub Reserved1: [u8; 7],
pub _bitfield2: u64,
}Fields§
§_bitfield1: u8§Reserved1: [u8; 7]§_bitfield2: u64Implementations§
source§impl DSTORAGE_REQUEST_OPTIONS
impl DSTORAGE_REQUEST_OPTIONS
Since DirectStorage is compiled with MSVC, we have to use it’s rules for C bitfields. MSVC will only pack fields of the same type in the same backing field.
struct DSTORAGE_REQUEST_OPTIONS {
DSTORAGE_COMPRESSION_FORMAT CompressionFormat : 8; // uint8_t -> saved into A
DSTORAGE_REQUEST_SOURCE_TYPE SourceType : 1; // uint64_t -> packed together into B
DSTORAGE_REQUEST_DESTINATION_TYPE DestinationType : 7; // uint64_t -> packed together into B
UINT64 Reserved : 48; // uint64_t -> packed together into B
};
// Resulting layout:
struct Storage {
uint8_t A;
uint8_t PADDING[7];
uint64_t B;
}
pub fn CompressionFormat(&self) -> DSTORAGE_COMPRESSION_FORMAT
pub fn set_CompressionFormat(&mut self, value: DSTORAGE_COMPRESSION_FORMAT)
pub fn SourceType(&self) -> DSTORAGE_REQUEST_SOURCE_TYPE
pub fn set_SourceType(&mut self, value: DSTORAGE_REQUEST_SOURCE_TYPE)
pub fn DestinationType(&self) -> DSTORAGE_REQUEST_DESTINATION_TYPE
pub fn set_DestinationType(&mut self, value: DSTORAGE_REQUEST_DESTINATION_TYPE)
Trait Implementations§
source§impl Clone for DSTORAGE_REQUEST_OPTIONS
impl Clone for DSTORAGE_REQUEST_OPTIONS
source§impl Debug for DSTORAGE_REQUEST_OPTIONS
impl Debug for DSTORAGE_REQUEST_OPTIONS
source§impl Default for DSTORAGE_REQUEST_OPTIONS
impl Default for DSTORAGE_REQUEST_OPTIONS
source§impl PartialEq for DSTORAGE_REQUEST_OPTIONS
impl PartialEq for DSTORAGE_REQUEST_OPTIONS
impl Copy for DSTORAGE_REQUEST_OPTIONS
impl Eq for DSTORAGE_REQUEST_OPTIONS
Auto Trait Implementations§
impl RefUnwindSafe for DSTORAGE_REQUEST_OPTIONS
impl Send for DSTORAGE_REQUEST_OPTIONS
impl Sync for DSTORAGE_REQUEST_OPTIONS
impl Unpin for DSTORAGE_REQUEST_OPTIONS
impl UnwindSafe for DSTORAGE_REQUEST_OPTIONS
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