pub struct Memory { /* private fields */ }Expand description
Sets guest startup RAM size to megs megabytes. Default is 128 MiB. Optionally, a suffix of “M” or “G” can be used to signify a value in megabytes or gigabytes respectively. Optional pair slots, maxmem could be used to set amount of hotpluggable memory slots and maximum amount of memory. Note that maxmem must be aligned to the page size.
For example, the following command-line sets the guest startup RAM size to 1GB, creates 3 slots to hotplug additional memory and sets the maximum memory the guest can reach to 4GB:
-m 1G,slots=3,maxmem=4G
If slots and maxmem are not specified, memory hotplug won’t be enabled and the guest startup RAM will never increase.
Implementations§
Trait Implementations§
Source§impl Arbitrary for Memory
impl Arbitrary for Memory
Source§type Parameters = (<MemoryUnit as Arbitrary>::Parameters, <Option<usize> as Arbitrary>::Parameters, <Option<MemoryUnit> as Arbitrary>::Parameters)
type Parameters = (<MemoryUnit as Arbitrary>::Parameters, <Option<usize> as Arbitrary>::Parameters, <Option<MemoryUnit> as Arbitrary>::Parameters)
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = Map<(<MemoryUnit as Arbitrary>::Strategy, <Option<usize> as Arbitrary>::Strategy, <Option<MemoryUnit> as Arbitrary>::Strategy), fn((MemoryUnit, Option<usize>, Option<MemoryUnit>)) -> Memory>
type Strategy = Map<(<MemoryUnit as Arbitrary>::Strategy, <Option<usize> as Arbitrary>::Strategy, <Option<MemoryUnit> as Arbitrary>::Strategy), fn((MemoryUnit, Option<usize>, Option<MemoryUnit>)) -> Memory>
The type of
Strategy used to generate values of type Self.Source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
Source§impl Ord for Memory
impl Ord for Memory
Source§impl PartialOrd for Memory
impl PartialOrd for Memory
Source§impl ToCommand for Memory
impl ToCommand for Memory
Source§fn command(&self) -> String
fn command(&self) -> String
Convert to a type suitable to pass to
std::process::Command::new()Source§fn to_args(&self) -> Vec<String>
fn to_args(&self) -> Vec<String>
Convert to a type suitable to pass to
std::process::Command::args()fn has_args(&self) -> bool
Source§fn to_command(&self) -> Vec<String>
fn to_command(&self) -> Vec<String>
Construct the full command in keep in pieces
Source§fn to_single_command(&self) -> String
fn to_single_command(&self) -> String
Construct the full command as a single
StringSource§fn to_single_arg(&self) -> String
fn to_single_arg(&self) -> String
Construct only the args as a single
Stringimpl Eq for Memory
impl StructuralPartialEq for Memory
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnsafeUnpin for Memory
impl UnwindSafe for Memory
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