pub struct Item {
pub url: String,
pub archived_at: NaiveDateTime,
pub digest: String,
pub mime_type: String,
pub length: u64,
pub status: Option<u16>,
}
Expand description
Information about a single archived snapshot of a page.
Fields§
§url: String
§archived_at: NaiveDateTime
§digest: String
§mime_type: String
§length: u64
§status: Option<u16>
Implementations§
Source§impl Item
impl Item
pub fn new( url: String, archived_at: NaiveDateTime, digest: String, mime_type: String, length: u64, status: Option<u16>, ) -> Item
pub fn wayback_url(&self, original: bool) -> String
pub fn timestamp(&self) -> String
pub fn status_code(&self) -> String
pub fn make_filename(&self) -> String
pub fn with_digest(&self, digest: &str) -> Item
pub fn parse_optional_record( url: Option<&str>, timestamp: Option<&str>, digest: Option<&str>, mime_type: Option<&str>, length: Option<&str>, status: Option<&str>, ) -> Result<Item, Error>
pub fn to_record(&self) -> Vec<String>
Trait Implementations§
Source§impl Ord for Item
impl Ord for Item
Source§impl PartialOrd for Item
impl PartialOrd for Item
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.