pub struct ScsiHost { /* private fields */ }
Expand description
Fetch and modify SCSI host parameters.
Implementations§
Source§impl ScsiHost
impl ScsiHost
pub fn active_mod(&self) -> Result<String>
pub fn can_queue(&self) -> Result<i32>
pub fn host_busy(&self) -> Result<u8>
Sourcepub fn link_power_management_policy(&self) -> Result<String>
pub fn link_power_management_policy(&self) -> Result<String>
Sourcepub fn set_link_power_management_policy<'b>(
&self,
profiles: &[&'b str],
) -> Result<&'b str>
pub fn set_link_power_management_policy<'b>( &self, profiles: &[&'b str], ) -> Result<&'b str>
Sets the power management profile for this SCSI host.
Multiple profiles are given, and each profile is tried until one succeeds.
pub fn proc_name(&self) -> Result<String>
pub fn sg_tablesize(&self) -> Result<i32>
pub fn state(&self) -> Result<String>
pub fn supported_mode(&self) -> Result<u8>
pub fn use_blk_mq(&self) -> Result<u8>
Trait Implementations§
Source§impl SysClass for ScsiHost
impl SysClass for ScsiHost
Source§fn class() -> &'static str
fn class() -> &'static str
Return the class of the sys object, the name of a folder in `/sys/${base}``
Source§unsafe fn from_path_unchecked(path: PathBuf) -> Self
unsafe fn from_path_unchecked(path: PathBuf) -> Self
Create a sys object from an absolute path without checking path for validity
Source§fn dir() -> PathBuf
fn dir() -> PathBuf
Return the path to the sys objects, the full path of a folder in /sys/class
Source§fn from_path(path: &Path) -> Result<Self>
fn from_path(path: &Path) -> Result<Self>
Create a sys object from a path, checking it for validity
Source§fn iter() -> Box<dyn Iterator<Item = Result<Self>>>where
Self: 'static,
fn iter() -> Box<dyn Iterator<Item = Result<Self>>>where
Self: 'static,
Retrieve all of the object instances of a sys class, with a boxed iterator
Source§fn read_file<P: AsRef<Path>>(&self, name: P) -> Result<String>
fn read_file<P: AsRef<Path>>(&self, name: P) -> Result<String>
Read a file underneath the sys object
Source§fn parse_file<F: FromStr, P: AsRef<Path>>(&self, name: P) -> Result<F>
fn parse_file<F: FromStr, P: AsRef<Path>>(&self, name: P) -> Result<F>
Parse a number from a file underneath the sys object
Auto Trait Implementations§
impl Freeze for ScsiHost
impl RefUnwindSafe for ScsiHost
impl Send for ScsiHost
impl Sync for ScsiHost
impl Unpin for ScsiHost
impl UnwindSafe for ScsiHost
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