[−][src]Struct xkcd_get::Comic
Representation of an xkcd comic
Fields
title: String
The full title of the comic
safe_title: String
The title of the comic formatted for safe use in an HTML title tag
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
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]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,