[][src]Struct deep_learning_playground::utils::fetch_client::DirClient

pub struct DirClient<'a> {
    pub file: HashMap<String, FileInfo<'a>>,
    // some fields omitted
}

A type that executes the specified file existence check and creation, path resolution, etc. based on the save destination directory.

Fields

file: HashMap<String, FileInfo<'a>>

Hash map with file name as key and related information as value

Methods

impl<'a> DirClient<'a>[src]

pub fn new<T>(cfg: FConf<'a, T>) -> Result<Self> where
    T: Iterator<Item = &'a RemoteFile<'a>> + ExactSizeIterator
[src]

DirClient constructor

pub fn file_path(&self, fname: &str) -> PathBuf[src]

file_path creates the path of file x under the current directory from the specified file name x

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

create creates directory

pub fn file_create(&self, dst: &str, src: &mut Bytes) -> Result<()>[src]

file_create creates file in directory

pub fn exists(&self) -> bool[src]

exists checks if the specified directory exists

pub fn file_exists(&self, fname: &str) -> bool[src]

file_exists checks if the specified file exists under the directory

pub fn rm_file(&self, fname: &str) -> Result<(), Error>[src]

Delete the specified file under the directory

Trait Implementations

impl<'a> Clone for DirClient<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for DirClient<'a>

impl<'a> Send for DirClient<'a>

impl<'a> Sync for DirClient<'a>

impl<'a> Unpin for DirClient<'a>

impl<'a> UnwindSafe for DirClient<'a>

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> FromPy<T> for T

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

impl<T, U> IntoPy<U> for T where
    U: FromPy<T>, 

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,