pub struct DiskCreate {
pub name: String,
pub description: String,
pub disk_source: DiskSource,
pub size: u64,
}
Expand description
Create-time parameters for a Disk
Fields§
§name: String
Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’. Names cannot be a UUID though they may contain a UUID.
description: String
§disk_source: DiskSource
§size: u64
A count of bytes, typically used either for memory or storage capacity
The maximum supported byte count is i64::MAX
. This makes it somewhat inconvenient to define constructors: a u32 constructor can be infallible, but an i64 constructor can fail (if the value is negative) and a u64 constructor can fail (if the value is larger than i64::MAX). We provide all of these for consumers’ convenience.
Trait Implementations§
Source§impl Clone for DiskCreate
impl Clone for DiskCreate
Source§fn clone(&self) -> DiskCreate
fn clone(&self) -> DiskCreate
Returns a duplicate of the value. Read more
1.0.0 · 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 DiskCreate
impl Debug for DiskCreate
Source§impl<'de> Deserialize<'de> for DiskCreate
impl<'de> Deserialize<'de> for DiskCreate
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 JsonSchema for DiskCreate
impl JsonSchema for DiskCreate
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl PartialEq for DiskCreate
impl PartialEq for DiskCreate
Source§impl Serialize for DiskCreate
impl Serialize for DiskCreate
Source§impl Tabled for DiskCreate
impl Tabled for DiskCreate
impl StructuralPartialEq for DiskCreate
Auto Trait Implementations§
impl Freeze for DiskCreate
impl RefUnwindSafe for DiskCreate
impl Send for DiskCreate
impl Sync for DiskCreate
impl Unpin for DiskCreate
impl UnwindSafe for DiskCreate
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