add retry interval

This commit is contained in:
2022-03-09 22:50:31 +08:00
parent ade8486b3a
commit e9208700d9
14 changed files with 606 additions and 117 deletions

View File

@@ -31,7 +31,7 @@ impl PixivData {
}
/// Read data from JSON object.
/// The object is from https://www.pixiv.net/artworks/<id>
/// The object is from `https://www.pixiv.net/artworks/<id>`
/// * `value` - The JSON object
/// * `allow_overwrite` - Allow overwrite the data existing.
pub fn from_web_page_data(&mut self, value: &JsonValue, allow_overwrite: bool) {

View File

@@ -135,3 +135,15 @@ impl ToJson for String {
Some(JsonValue::String(self.to_string()))
}
}
impl ToJson for JsonValue {
fn to_json(&self) -> Option<JsonValue> {
Some(self.clone())
}
}
impl ToJson for &JsonValue {
fn to_json(&self) -> Option<JsonValue> {
Some((*self).clone())
}
}