pub struct StorageVol { /* private fields */ }
Expand description

Provides APIs for the management of storage volumes.

See http://libvirt.org/html/libvirt-libvirt-storage.html

Implementations§

source§

impl StorageVol

source

pub fn new(ptr: virStorageVolPtr) -> StorageVol

source

pub fn as_ptr(&self) -> virStorageVolPtr

source

pub fn get_connect(&self) -> Result<Connect, Error>

source

pub fn create_xml( pool: &StoragePool, xml: &str, flags: virStorageVolCreateFlags ) -> Result<StorageVol, Error>

source

pub fn create_xml_from( pool: &StoragePool, xml: &str, vol: &StorageVol, flags: virStorageVolCreateFlags ) -> Result<StorageVol, Error>

source

pub fn lookup_by_name( pool: &StoragePool, name: &str ) -> Result<StorageVol, Error>

source

pub fn lookup_by_key(conn: &Connect, key: &str) -> Result<StorageVol, Error>

source

pub fn lookup_by_path(conn: &Connect, path: &str) -> Result<StorageVol, Error>

source

pub fn get_name(&self) -> Result<String, Error>

source

pub fn get_key(&self) -> Result<String, Error>

source

pub fn get_path(&self) -> Result<String, Error>

source

pub fn get_xml_desc(&self, flags: u32) -> Result<String, Error>

source

pub fn delete(&self, flags: u32) -> Result<(), Error>

source

pub fn wipe(&self, flags: u32) -> Result<(), Error>

source

pub fn wipe_pattern( &self, algo: virStorageVolWipeAlgorithm, flags: u32 ) -> Result<(), Error>

source

pub fn free(&mut self) -> Result<(), Error>

source

pub fn resize(&self, capacity: u64, flags: u32) -> Result<u32, Error>

source

pub fn get_info(&self) -> Result<StorageVolInfo, Error>

source

pub fn get_info_flags(&self, flags: u32) -> Result<StorageVolInfo, Error>

source

pub fn download( &self, stream: &Stream, offset: u64, length: u64, flags: u32 ) -> Result<(), Error>

source

pub fn upload( &self, stream: &Stream, offset: u64, length: u64, flags: u32 ) -> Result<(), Error>

Trait Implementations§

source§

impl Debug for StorageVol

source§

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

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

impl Drop for StorageVol

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere 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 Twhere 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.