pub struct PveDraidConfig {
pub data: i64,
pub spares: i64,
}Fields§
§data: i64The number of data devices per redundancy group. (dRAID)
spares: i64Number of dRAID spares.
Implementations§
Source§impl PveDraidConfig
impl PveDraidConfig
pub fn new(data: i64, spares: i64) -> PveDraidConfig
Source§impl PveDraidConfig
impl PveDraidConfig
Sourcepub fn to_shorthand(&self) -> String
pub fn to_shorthand(&self) -> String
Serialise this PveDraidConfig 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: PveDraidConfig
→ "virtio,bridge=vmbr0"
Trait Implementations§
Source§impl Clone for PveDraidConfig
impl Clone for PveDraidConfig
Source§fn clone(&self) -> PveDraidConfig
fn clone(&self) -> PveDraidConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PveDraidConfig
impl Debug for PveDraidConfig
Source§impl Default for PveDraidConfig
impl Default for PveDraidConfig
Source§fn default() -> PveDraidConfig
fn default() -> PveDraidConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PveDraidConfig
impl<'de> Deserialize<'de> for PveDraidConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PveDraidConfig
impl PartialEq for PveDraidConfig
Source§fn eq(&self, other: &PveDraidConfig) -> bool
fn eq(&self, other: &PveDraidConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PveDraidConfig
impl Serialize for PveDraidConfig
impl StructuralPartialEq for PveDraidConfig
Auto Trait Implementations§
impl Freeze for PveDraidConfig
impl RefUnwindSafe for PveDraidConfig
impl Send for PveDraidConfig
impl Sync for PveDraidConfig
impl Unpin for PveDraidConfig
impl UnsafeUnpin for PveDraidConfig
impl UnwindSafe for PveDraidConfig
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