Crate crosvm_data_model
source ·Re-exports
pub use crate::endian::*;
pub use crate::volatile_memory::*;
Modules
Explicit endian types useful for embedding in structs or reinterpreting data.
Types for volatile access to memory.
Macros
Always use this macro for implementing the FlexibleArray<
S
> trait for a given T
. There
exists an 1:1 mapping of macro identifiers to the definitions in the FlexibleArray<S
>
documentation, so refer to that for more information.Structs
This type is essentialy
std::io::IoBufMut
, and guaranteed to be ABI-compatible with
libc::iovec
; however, it does NOT automatically deref to &mut [u8]
, which is critical
because it can point to guest memory. (Guest memory is implicitly mutably borrowed by the
guest, so another mutable borrow would violate Rust assumptions about references.)Traits
Types for which it is safe to initialize from raw data.
The following code provides generic helpers for creating and accessing flexible array structs.
A complete definition of flexible array structs is found in the ISO 9899 specification
http://www.iso-9899.info/n1570.html. A flexible array struct is of the form:
Functions
Cross platform stub to create a platform specific IoBuf.
The kernel API has many structs that resemble the following
Foo
structure:Type Definitions
Cross platform binary compatible iovec.