Struct telegraph_rs::AccountBuilder[][src]

pub struct AccountBuilder { /* fields omitted */ }

Implementations

impl AccountBuilder[src]

pub fn new(short_name: &str) -> Self[src]

pub fn short_name(self, short_name: &str) -> Self[src]

Account name, helps users with several accounts remember which they are currently using.

Displayed to the user above the “Edit/Publish” button on Telegra.ph,

other users don’t see this name.

pub fn access_token(self, access_token: &str) -> Self[src]

Access token of the Telegraph account.

pub fn author_name(self, author_name: &str) -> Self[src]

Default author name used when creating new articles.

pub fn author_url(self, author_url: &str) -> Self[src]

Default profile link, opened when users click on the author’s name below the title.

Can be any link, not necessarily to a Telegram profile or channel.

pub async fn create(self) -> Result<Telegraph>[src]

If access_token is not set, an new account will be create.

Otherwise import the existing account.

pub async fn edit(self) -> Result<Telegraph>[src]

Edit info of an an existing account.

Trait Implementations

impl Debug for AccountBuilder[src]

impl Default for AccountBuilder[src]

Auto Trait Implementations

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.