pub struct BlockDeviceSource {
pub device: String,
pub filesystem: i32,
pub need_format: bool,
pub need_resize: bool,
}Expand description
Block device volume source
Controls how block devices are mounted in the guest:
- filesystem: Target filesystem type (only EXT4 supported for resize)
- need_format: If true, format device before mounting (use for fresh disks)
- need_resize: If true, resize filesystem after mounting to fill available space (use when QCOW2 virtual size > filesystem size)
Fields§
§device: Stringdevice path (e.g., “/dev/vda”)
filesystem: i32target filesystem type (e.g., EXT4)
need_format: boolif true, format device with filesystem before mount
need_resize: boolif true, run resize2fs after mount to fill disk
Implementations§
Source§impl BlockDeviceSource
impl BlockDeviceSource
Sourcepub fn filesystem(&self) -> Filesystem
pub fn filesystem(&self) -> Filesystem
Returns the enum value of filesystem, or the default if the field is set to an invalid enum value.
Sourcepub fn set_filesystem(&mut self, value: Filesystem)
pub fn set_filesystem(&mut self, value: Filesystem)
Sets filesystem to the provided enum value.
Trait Implementations§
Source§impl Clone for BlockDeviceSource
impl Clone for BlockDeviceSource
Source§fn clone(&self) -> BlockDeviceSource
fn clone(&self) -> BlockDeviceSource
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 BlockDeviceSource
impl Debug for BlockDeviceSource
Source§impl Default for BlockDeviceSource
impl Default for BlockDeviceSource
Source§impl Message for BlockDeviceSource
impl Message for BlockDeviceSource
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for BlockDeviceSource
impl PartialEq for BlockDeviceSource
impl StructuralPartialEq for BlockDeviceSource
Auto Trait Implementations§
impl Freeze for BlockDeviceSource
impl RefUnwindSafe for BlockDeviceSource
impl Send for BlockDeviceSource
impl Sync for BlockDeviceSource
impl Unpin for BlockDeviceSource
impl UnwindSafe for BlockDeviceSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request