Skip to main content

Machine

Struct Machine 

Source
pub struct Machine { /* private fields */ }

Implementations§

Source§

impl Machine

Source

pub fn new(config: MachineConfig) -> Self

Source

pub fn config(&self) -> &MachineConfig

Source

pub fn status(&self) -> MachineStatus

Source

pub fn config_mut(&mut self) -> &mut MachineConfig

Source

pub fn set_ram_bytes(&mut self, bytes: u64)

Source

pub fn set_vga_memory_bytes(&mut self, bytes: u64)

Source

pub fn set_command_line(&mut self, command_line: impl Into<String>)

Source

pub fn attach_backend(&mut self, backend: impl ExecutionBackend + 'static)

Source

pub fn set_bios(&mut self, image: Image) -> Result<()>

Source

pub fn set_vga_bios(&mut self, image: Image) -> Result<()>

Source

pub fn set_disk(&mut self, image: Image) -> Result<()>

Source

pub fn set_cdrom(&mut self, image: Image) -> Result<()>

Source

pub fn set_bootloader(&mut self, bootloader: Bootloader)

Source

pub fn load_bootloader(&mut self, source: Resource) -> Result<()>

Source

pub fn load_image(&mut self, kind: ImageKind, source: Resource) -> Result<()>

Source

pub fn set_saved_state(&mut self, state: SavedState)

Source

pub fn load_saved_state(&mut self, source: Resource) -> Result<()>

Source

pub fn bios(&self) -> Option<&Image>

Source

pub fn vga_bios(&self) -> Option<&Image>

Source

pub fn disk(&self) -> Option<&Image>

Source

pub fn cdrom(&self) -> Option<&Image>

Source

pub fn bootloader(&self) -> Option<&Bootloader>

Source

pub fn saved_state(&self) -> Option<&SavedState>

Source

pub fn prepare(&mut self) -> Result<()>

Source

pub fn run(&mut self, options: RunOptions) -> Result<RunReport>

Source

pub fn vga_framebuffer_rgb(&self) -> Option<(u32, u32, Vec<u8>)>

Source

pub fn inject_text(&mut self, text: &str) -> Result<usize>

Source

pub fn stop(&mut self)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.