Skip to main content

PveIdeConfig

Struct PveIdeConfig 

Source
pub struct PveIdeConfig {
Show 45 fields pub aio: Option<PveAioEnum>, pub backup: Option<PveBoolean>, pub bps: Option<i64>, pub bps_max_length: Option<i64>, pub bps_rd: Option<i64>, pub bps_rd_length: Option<String>, pub bps_rd_max_length: Option<i64>, pub bps_wr: Option<i64>, pub bps_wr_length: Option<String>, pub bps_wr_max_length: Option<i64>, pub cache: Option<PveCacheEnum>, pub detect_zeroes: Option<PveBoolean>, pub discard: Option<PveDiscardEnum>, pub file: String, pub format: Option<PveFormatEnum>, pub import_from: Option<String>, pub iops: Option<i64>, pub iops_max: Option<i64>, pub iops_max_length: Option<i64>, pub iops_rd: Option<i64>, pub iops_rd_length: Option<String>, pub iops_rd_max: Option<i64>, pub iops_rd_max_length: Option<i64>, pub iops_wr: Option<i64>, pub iops_wr_length: Option<String>, pub iops_wr_max: Option<i64>, pub iops_wr_max_length: Option<i64>, pub mbps: Option<f64>, pub mbps_max: Option<f64>, pub mbps_rd: Option<f64>, pub mbps_rd_max: Option<f64>, pub mbps_wr: Option<f64>, pub mbps_wr_max: Option<f64>, pub media: Option<PveMediaEnum>, pub model: Option<String>, pub replicate: Option<PveBoolean>, pub rerror: Option<PveRerrorEnum>, pub serial: Option<String>, pub shared: Option<PveBoolean>, pub size: Option<String>, pub snapshot: Option<PveBoolean>, pub ssd: Option<PveBoolean>, pub volume: Option<String>, pub werror: Option<PveWerrorEnum>, pub wwn: Option<String>,
}

Fields§

§aio: Option<PveAioEnum>

AIO type to use.

§backup: Option<PveBoolean>

Whether the drive should be included when making backups.

§bps: Option<i64>

Maximum r/w speed in bytes per second.

§bps_max_length: Option<i64>

Maximum length of I/O bursts in seconds.

§bps_rd: Option<i64>

Maximum read speed in bytes per second.

§bps_rd_length: Option<String>§bps_rd_max_length: Option<i64>

Maximum length of read I/O bursts in seconds.

§bps_wr: Option<i64>

Maximum write speed in bytes per second.

§bps_wr_length: Option<String>§bps_wr_max_length: Option<i64>

Maximum length of write I/O bursts in seconds.

§cache: Option<PveCacheEnum>

The drive’s cache mode

§detect_zeroes: Option<PveBoolean>

Controls whether to detect and try to optimize writes of zeroes.

§discard: Option<PveDiscardEnum>

Controls whether to pass discard/trim requests to the underlying storage.

§file: String

The drive’s backing volume.

§format: Option<PveFormatEnum>

The drive’s backing file’s data format.

§import_from: Option<String>

Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it’s up to you to ensure that the source is not actively used by another process during the import!

§iops: Option<i64>

Maximum r/w I/O in operations per second.

§iops_max: Option<i64>

Maximum unthrottled r/w I/O pool in operations per second.

§iops_max_length: Option<i64>

Maximum length of I/O bursts in seconds.

§iops_rd: Option<i64>

Maximum read I/O in operations per second.

§iops_rd_length: Option<String>§iops_rd_max: Option<i64>

Maximum unthrottled read I/O pool in operations per second.

§iops_rd_max_length: Option<i64>

Maximum length of read I/O bursts in seconds.

§iops_wr: Option<i64>

Maximum write I/O in operations per second.

§iops_wr_length: Option<String>§iops_wr_max: Option<i64>

Maximum unthrottled write I/O pool in operations per second.

§iops_wr_max_length: Option<i64>

Maximum length of write I/O bursts in seconds.

§mbps: Option<f64>

Maximum r/w speed in megabytes per second.

§mbps_max: Option<f64>

Maximum unthrottled r/w pool in megabytes per second.

§mbps_rd: Option<f64>

Maximum read speed in megabytes per second.

§mbps_rd_max: Option<f64>

Maximum unthrottled read pool in megabytes per second.

§mbps_wr: Option<f64>

Maximum write speed in megabytes per second.

§mbps_wr_max: Option<f64>

Maximum unthrottled write pool in megabytes per second.

§media: Option<PveMediaEnum>

The drive’s media type.

§model: Option<String>

The drive’s reported model name, url-encoded, up to 40 bytes long.

§replicate: Option<PveBoolean>

Whether the drive should considered for replication jobs.

§rerror: Option<PveRerrorEnum>

Read error action.

§serial: Option<String>

The drive’s reported serial number, url-encoded, up to 20 bytes long.

§shared: Option<PveBoolean>

Mark this locally-managed volume as available on all nodes. WARNING: This option does not share the volume automatically, it assumes it is shared already!

§size: Option<String>

Disk size. This is purely informational and has no effect.

§snapshot: Option<PveBoolean>

Controls qemu’s snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.

§ssd: Option<PveBoolean>

Whether to expose this drive as an SSD, rather than a rotational hard disk.

§volume: Option<String>§werror: Option<PveWerrorEnum>

Write error action.

§wwn: Option<String>

The drive’s worldwide name, encoded as 16 bytes hex string, prefixed by ‘0x’.

Implementations§

Source§

impl PveIdeConfig

Source

pub fn new(file: String) -> PveIdeConfig

Source§

impl PveIdeConfig

Source

pub fn to_shorthand(&self) -> String

Serialise this PveIdeConfig into Proxmox’s CLI-style shorthand string (key=value,…). The property marked x-pve-default-key is emitted positionally without a key= prefix; aliases collapse multiple property names to the same wire key.

Example: PveIdeConfig "virtio,bridge=vmbr0"

Trait Implementations§

Source§

impl Clone for PveIdeConfig

Source§

fn clone(&self) -> PveIdeConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PveIdeConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PveIdeConfig

Source§

fn default() -> PveIdeConfig

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

impl<'de> Deserialize<'de> for PveIdeConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for PveIdeConfig

Source§

fn eq(&self, other: &PveIdeConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for PveIdeConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PveIdeConfig

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,