Struct roux::Reddit[][src]

pub struct Reddit { /* fields omitted */ }

Client to use OAuth with Reddit.

Implementations

impl Reddit[src]

pub fn new(user_agent: &str, client_id: &str, client_secret: &str) -> Reddit[src]

Creates a Reddit instance with user_agent, client_id, and client_secret.

pub fn username(self, username: &str) -> Reddit[src]

Sets username.

pub fn password(self, password: &str) -> Reddit[src]

Sets password.

pub async fn login(self) -> Result<Me, RouxError>[src]

Login as a user.

Auto Trait Implementations

impl !RefUnwindSafe for Reddit

impl Send for Reddit

impl Sync for Reddit

impl Unpin for Reddit

impl !UnwindSafe for Reddit

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> Instrument 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.