pub struct Cpus {
    pub boot_vcpus: Option<u8>,
    pub max_vcpus: Option<u8>,
    pub topology: Option<CpuTopology>,
    pub kvm_hyperv: Option<OnOff>,
    pub max_phys_bits: Option<u8>,
    pub affinity: Option<Vec<CpuAffinity>>,
    pub features: Option<Vec<CpuFeatures>>,
}

Fields§

§boot_vcpus: Option<u8>§max_vcpus: Option<u8>§topology: Option<CpuTopology>§kvm_hyperv: Option<OnOff>§max_phys_bits: Option<u8>§affinity: Option<Vec<CpuAffinity>>§features: Option<Vec<CpuFeatures>>

Implementations§

source§

impl Cpus

source

pub fn new() -> Self

source

pub fn boot(&mut self, boot: u8) -> &mut Self

source

pub fn max(&mut self, max: u8) -> &mut Self

source

pub fn topology(&mut self, topology: CpuTopology) -> &mut Self

source

pub fn kvm_hyperv(&mut self, state: OnOff) -> &mut Self

source

pub fn max_phys_bits(&mut self, bits: u8) -> &mut Self

source

pub fn affinity(&mut self, affinity: Vec<CpuAffinity>) -> &mut Self

source

pub fn features(&mut self, features: Vec<CpuFeatures>) -> &mut Self

Trait Implementations§

source§

impl Default for Cpus

source§

fn default() -> Cpus

Returns the “default value” for a type. Read more
source§

impl ToCommand for Cpus

Auto Trait Implementations§

§

impl RefUnwindSafe for Cpus

§

impl Send for Cpus

§

impl Sync for Cpus

§

impl Unpin for Cpus

§

impl UnwindSafe for Cpus

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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.