Struct virt::storage_vol::StorageVol
source · 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
impl StorageVol
pub fn new(ptr: virStorageVolPtr) -> StorageVol
pub fn as_ptr(&self) -> virStorageVolPtr
pub fn get_connect(&self) -> Result<Connect, Error>
pub fn create_xml( pool: &StoragePool, xml: &str, flags: virStorageVolCreateFlags ) -> Result<StorageVol, Error>
pub fn create_xml_from( pool: &StoragePool, xml: &str, vol: &StorageVol, flags: virStorageVolCreateFlags ) -> Result<StorageVol, Error>
pub fn lookup_by_name( pool: &StoragePool, name: &str ) -> Result<StorageVol, Error>
pub fn lookup_by_key(conn: &Connect, key: &str) -> Result<StorageVol, Error>
pub fn lookup_by_path(conn: &Connect, path: &str) -> Result<StorageVol, Error>
pub fn get_name(&self) -> Result<String, Error>
pub fn get_key(&self) -> Result<String, Error>
pub fn get_path(&self) -> Result<String, Error>
pub fn get_xml_desc(&self, flags: u32) -> Result<String, Error>
pub fn delete(&self, flags: u32) -> Result<(), Error>
pub fn wipe(&self, flags: u32) -> Result<(), Error>
pub fn wipe_pattern( &self, algo: virStorageVolWipeAlgorithm, flags: u32 ) -> Result<(), Error>
pub fn free(&mut self) -> Result<(), Error>
pub fn resize(&self, capacity: u64, flags: u32) -> Result<u32, Error>
pub fn get_info(&self) -> Result<StorageVolInfo, Error>
pub fn get_info_flags(&self, flags: u32) -> Result<StorageVolInfo, Error>
pub fn download( &self, stream: &Stream, offset: u64, length: u64, flags: u32 ) -> Result<(), Error>
pub fn upload( &self, stream: &Stream, offset: u64, length: u64, flags: u32 ) -> Result<(), Error>
Trait Implementations§
source§impl Debug for StorageVol
impl Debug for StorageVol
Auto Trait Implementations§
impl RefUnwindSafe for StorageVol
impl !Send for StorageVol
impl !Sync for StorageVol
impl Unpin for StorageVol
impl UnwindSafe for StorageVol
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