[][src]Struct xkcd_get::Comic

pub struct Comic {
    pub title: String,
    pub link: String,
    pub num: u32,
    pub img: String,
    pub alt: String,
    pub news: String,
    pub transcript: String,
    pub date: Date<Utc>,
}

Representation of an xkcd comic

Fields

title: String

The full title of the comic

link: String

A URL to this comic on the xkcd site

num: u32

The comic number

img: String

A URL to this comic's image

alt: String

The alt-text / title-text for this image

news: String

The news field is somewhat vague but should contain information on occasion

transcript: String

A transcript of this comic, if available

date: Date<Utc>

The publication date of this comic, presumably in UTC

Methods

impl Comic[src]

pub fn get(number: u32) -> Result<Comic, Box<dyn Error>>[src]

Get a comic by its comic number This will fail with a parsing error if number is less than 1 or greater than the latest comic's number, or if the page simply fails to load.

pub fn latest() -> Result<Comic, Box<dyn Error>>[src]

Get the latest comic

Trait Implementations

impl Debug for Comic[src]

Auto Trait Implementations

impl Sync for Comic

impl Send for Comic

impl Unpin for Comic

impl RefUnwindSafe for Comic

impl UnwindSafe for Comic

Blanket Implementations

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

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

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> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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