Struct scrapyard::MasterConfig
source · pub struct MasterConfig {
pub store: PathBuf,
pub max_retries: u16,
pub request_timeout: u64,
pub script_timeout: u64,
}Expand description
Main config file
Fields§
§store: PathBufWhere cache and metadata of feeds are stored
max_retries: u16Maximum number of retries before giving up scraping a feed
request_timeout: u64Number of seconds before request is considered timed out
script_timeout: u64Number of seconds before scraper script is considered timed out
Trait Implementations§
source§impl Debug for MasterConfig
impl Debug for MasterConfig
source§impl Default for MasterConfig
impl Default for MasterConfig
source§impl<'de> Deserialize<'de> for MasterConfig
impl<'de> Deserialize<'de> for MasterConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Saveable for MasterConfig
impl Saveable for MasterConfig
source§fn load_string<'life0, 'async_trait>(
path: &'life0 Path
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error>>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn load_string<'life0, 'async_trait>(
path: &'life0 Path
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Load string content from a file
source§fn load_json<'life0, 'async_trait>(
path: &'life0 Path
) -> Pin<Box<dyn Future<Output = Result<Self, Box<dyn Error>>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn load_json<'life0, 'async_trait>(
path: &'life0 Path
) -> Pin<Box<dyn Future<Output = Result<Self, Box<dyn Error>>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Loads and deserializes json content from a file
source§fn load_rss<'life0, 'async_trait>(
path: &'life0 Path
) -> Pin<Box<dyn Future<Output = Result<Channel, Box<dyn Error>>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn load_rss<'life0, 'async_trait>(
path: &'life0 Path
) -> Pin<Box<dyn Future<Output = Result<Channel, Box<dyn Error>>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Loads and deserializes rss compatible xml from a file
source§fn save_string<'life0, 'async_trait>(
path: &'life0 Path,
s: String
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn save_string<'life0, 'async_trait>(
path: &'life0 Path,
s: String
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Saves a string to file
source§fn save_json<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_json<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Serializes and save as json
source§fn save_json_pretty<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_json_pretty<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Serializes and save as pretty json
Auto Trait Implementations§
impl RefUnwindSafe for MasterConfig
impl Send for MasterConfig
impl Sync for MasterConfig
impl Unpin for MasterConfig
impl UnwindSafe for MasterConfig
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