Struct x86_64::SetupDataEntries
source · pub struct SetupDataEntries {
pub(crate) entries: Vec<SetupData>,
pub(crate) setup_data_start: usize,
pub(crate) setup_data_end: usize,
pub(crate) available_size: usize,
}
Expand description
Collection of SetupData entries to be inserted in the
bootparam setup_data
linked list.
Fields§
§entries: Vec<SetupData>
§setup_data_start: usize
§setup_data_end: usize
§available_size: usize
Implementations§
source§impl SetupDataEntries
impl SetupDataEntries
sourcepub fn new(setup_data_start: usize, setup_data_end: usize) -> SetupDataEntries
pub fn new(setup_data_start: usize, setup_data_end: usize) -> SetupDataEntries
Returns a new instance of SetupDataEntries
sourcepub fn insert(&mut self, setup_data: SetupData) -> usize
pub fn insert(&mut self, setup_data: SetupData) -> usize
Adds a new SetupDataEntry and returns the remaining size available
sourcepub fn write_setup_data(
&self,
guest_mem: &GuestMemory,
) -> Result<Option<GuestAddress>>
pub fn write_setup_data( &self, guest_mem: &GuestMemory, ) -> Result<Option<GuestAddress>>
Copy setup_data entries to guest memory and link them together with the next
field.
Returns the guest address of the first entry in the setup_data list, if any.
Auto Trait Implementations§
impl Freeze for SetupDataEntries
impl RefUnwindSafe for SetupDataEntries
impl Send for SetupDataEntries
impl Sync for SetupDataEntries
impl Unpin for SetupDataEntries
impl UnwindSafe for SetupDataEntries
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.