[][src]Struct rustwtxt::Twtxt

pub struct Twtxt { /* fields omitted */ }

Holds tweets and metadata from a single twtxt.txt file.

Methods

impl Twtxt[src]

pub fn nick<'a>(&'a self) -> &'a str[src]

Returns the nickname associated with the twtxt.txt file.

pub fn url<'a>(&'a self) -> &'a str[src]

Returns the URL associated with the twtxt.txt file.

pub fn tweet(&self, datestamp: &str) -> Option<&Tweet>[src]

Returns a specific tweet by the timestamp key.

pub fn tweets(&self) -> &TweetMap[src]

Returns all tweets as a TweetMap, a thin wrapper around a BTreeMap. The tweets will be date-sorted.

pub fn from(url: &str) -> Option<Twtxt>[src]

Parse a remote twtxt.txt file into a Twtxt structure.

Trait Implementations

impl Eq for Twtxt[src]

impl Clone for Twtxt[src]

impl PartialEq<Twtxt> for Twtxt[src]

impl Debug for Twtxt[src]

Auto Trait Implementations

impl Unpin for Twtxt

impl Sync for Twtxt

impl Send for Twtxt

impl UnwindSafe for Twtxt

impl RefUnwindSafe for Twtxt

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for 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]