pub struct NodeDevice { /* private fields */ }Expand description
Provides APIs for the management of nodedevs.
Implementations§
Source§impl NodeDevice
impl NodeDevice
Sourcepub unsafe fn from_ptr(ptr: virNodeDevicePtr) -> NodeDevice
pub unsafe fn from_ptr(ptr: virNodeDevicePtr) -> NodeDevice
§Safety
The caller must ensure that the pointer is valid.
pub fn as_ptr(&self) -> virNodeDevicePtr
pub fn lookup_by_name(conn: &Connect, id: &str) -> Result<NodeDevice, Error>
pub fn lookup_scsi_host_by_www( conn: &Connect, wwnn: &str, wwpn: &str, flags: u32, ) -> Result<NodeDevice, Error>
pub fn create_xml( conn: &Connect, xml: &str, flags: u32, ) -> Result<NodeDevice, Error>
pub fn get_name(&self) -> Result<String, Error>
pub fn get_parent(&self) -> Result<String, Error>
pub fn get_xml_desc(&self, flags: u32) -> Result<String, Error>
pub fn destroy(&self) -> Result<u32, Error>
pub fn detach(&self) -> Result<u32, Error>
pub fn reset(&self) -> Result<u32, Error>
pub fn reattach(&self) -> Result<u32, Error>
pub fn detach_flags( &self, driver: Option<&str>, flags: u32, ) -> Result<u32, Error>
pub fn free(&mut self) -> Result<(), Error>
pub fn num_of_devices( conn: &Connect, cap: Option<&str>, flags: u32, ) -> Result<u32, Error>
pub fn num_of_caps(&self) -> Result<u32, Error>
pub fn list_caps(&self) -> Result<Vec<String>, Error>
Trait Implementations§
Source§impl Clone for NodeDevice
impl Clone for NodeDevice
Source§fn clone(&self) -> Self
fn clone(&self) -> Self
Creates a copy of a node device.
Increments the internal reference counter on the given
device. For each call to this method, there shall be a
corresponding call to free().
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 NodeDevice
impl Debug for NodeDevice
Source§impl Drop for NodeDevice
impl Drop for NodeDevice
impl Send for NodeDevice
impl Sync for NodeDevice
Auto Trait Implementations§
impl Freeze for NodeDevice
impl RefUnwindSafe for NodeDevice
impl Unpin for NodeDevice
impl UnwindSafe for NodeDevice
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