[][src]Struct rustwtxt::Tweet

pub struct Tweet { /* fields omitted */ }

Holds a single tweet.

Methods

impl Tweet[src]

pub fn timestamp(&self) -> &str[src]

Returns the timestamp for a given tweet.

pub fn body(&self) -> &str[src]

Returns the body of the tweet.

pub fn mentions(&self) -> Vec<String>[src]

Any mentions within the body of the tweet have been parsed out and are retrievable through this method.

pub fn tags(&self) -> Vec<String>[src]

Any tags within the body of the tweet have been parsed out and are retrievable through this method.

Trait Implementations

impl Clone for Tweet[src]

impl Debug for Tweet[src]

impl Eq for Tweet[src]

impl FromStr for Tweet[src]

type Err = Box<dyn Error>

The associated error which can be returned from parsing.

fn from_str(tweet: &str) -> Result<Tweet, Box<dyn Error>>[src]

Takes a properly-formatted twtxt tweet and parses it into a Tweet structure.

impl PartialEq<Tweet> for Tweet[src]

impl StructuralEq for Tweet[src]

impl StructuralPartialEq for Tweet[src]

Auto Trait Implementations

impl RefUnwindSafe for Tweet

impl Send for Tweet

impl Sync for Tweet

impl Unpin for Tweet

impl UnwindSafe for Tweet

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.