Struct proc_mounts::SwapList
source · [−]Expand description
A list of parsed swap entries from /proc/swaps
.
Tuple Fields
0: Vec<SwapInfo>
Implementations
sourceimpl SwapList
impl SwapList
pub fn parse_from<'a, I: Iterator<Item = &'a str>>(lines: I) -> Result<SwapList>
pub fn new() -> Result<SwapList>
pub fn new_from_file<P: AsRef<Path>>(path: P) -> Result<SwapList>
pub fn new_from_reader<R: BufRead>(reader: R) -> Result<SwapList>
sourcepub fn get_swapped(&self, path: &Path) -> bool
pub fn get_swapped(&self, path: &Path) -> bool
Returns true if the given path is a entry in the swap list.
Trait Implementations
impl Eq for SwapList
impl StructuralEq for SwapList
impl StructuralPartialEq for SwapList
Auto Trait Implementations
impl RefUnwindSafe for SwapList
impl Send for SwapList
impl Sync for SwapList
impl Unpin for SwapList
impl UnwindSafe for SwapList
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more