[][src]Struct parody::storage::Config

pub struct Config {
    pub query_in_path: QueryInPath,
    pub root_dir: PathBuf,
}

Control how you store cached response in the filesystem

Fields

query_in_path: QueryInPath

Which queries should affect the final storage directory

root_dir: PathBuf

Where all the files stored

Parody never should escape the root directory when stores requests

Methods

impl Config[src]

pub fn set_root_dir(&mut self, root_dir: PathBuf) -> &Self[src]

pub fn with_root_dir(self, root_dir: PathBuf) -> Self[src]

pub fn use_no_query_path(&mut self) -> &Self[src]

Make query parameters not affect the response storage path

pub fn with_no_query_path(self) -> Self[src]

pub fn use_all_query_path(&mut self) -> &Self[src]

Make all query parameters modify the storage path

pub fn with_all_query_path(self) -> Self[src]

pub fn use_query_path(&mut self, query: &str) -> &Self[src]

Make query parameter be included in resulting storage path

pub fn with_query_path(self, query: &str) -> Self[src]

pub fn is_query_in_path(&self, query: &str) -> bool[src]

pub fn get_root_dir(&self) -> &Path[src]

Trait Implementations

impl Clone for Config[src]

impl Default for Config[src]

Auto Trait Implementations

impl RefUnwindSafe for Config

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

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> CloneAny for T where
    T: Clone + Any

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

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

impl<T> PersistentInto<Arc<Mutex<T>>> for T[src]

impl<T> PersistentInto<Arc<RwLock<T>>> for T[src]

impl<T> PersistentInto<Arc<T>> for T[src]

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

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<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<T> Typeable for T where
    T: Any

impl<T> UnsafeAny for T where
    T: Any

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