[][src]Struct libblkid_rs::BlkidCache

pub struct BlkidCache(_);

Data structure representing cache in libblkid

Implementations

impl BlkidCache[src]

pub fn put_cache(&mut self)[src]

Save changes to cache file

pub fn get_cache(&mut self, filename: &Path) -> Result<()>[src]

Allocate and initalize cache handler

pub fn gc_cache(&mut self)[src]

Removes non-existant devices from cache

pub fn iter(&self) -> BlkidDevIter

Important traits for BlkidDevIter

impl Iterator for BlkidDevIter type Item = BlkidDev;
[src]

Create an iterator from the cached devices

pub fn probe_all(&mut self) -> Result<()>[src]

Probe for all block devices

pub fn probe_all_new(&mut self) -> Result<()>[src]

Probe for all new block devices

pub fn probe_all_removable(&mut self) -> Result<()>[src]

Probe for all removable block devices

pub fn get_dev(&self, devname: &str, flags: BlkidDevFlags) -> Result<BlkidDev>[src]

Find a device by device name in the cache.

Use the BlkidDevConst::Create flag to create an empty cache entry.

pub fn get_tag_value(&self, tag_name: &str, devname: &str) -> Result<&str>[src]

Get the value associated with a tag (e.g. TYPE) for a given device

pub fn get_devname(
    &self,
    token_or_pair: Either<&str, (&str, &str)>
) -> Result<&str>
[src]

Get the device name for a specific NAME=value tag pair in the cache

pub fn find_dev_with_tag(&self, type_: &str, value: &str) -> Result<BlkidDev>[src]

Find the device with the specified tag

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.