[][src]Struct elefren::UpdatePushRequest

pub struct UpdatePushRequest { /* fields omitted */ }

Builder to pass to the Mastodon::update_push_data method

Example

use elefren::requests::UpdatePushRequest;

let client = Mastodon::from(data);

let mut request = UpdatePushRequest::new("foobar");
request.follow(true).reblog(true);

client.update_push_data(&request)?;

Methods

impl UpdatePushRequest[src]

pub fn new(id: &str) -> UpdatePushRequest[src]

Construct a new UpdatePushRequest

Example

use elefren::requests::UpdatePushRequest;
let request = UpdatePushRequest::new("some-id");

pub fn follow(&mut self, follow: bool) -> &mut Self[src]

A flag that indicates if you want follow notifications pushed

Example

use elefren::requests::UpdatePushRequest;
let mut request = UpdatePushRequest::new("foobar");
request.follow(true);

pub fn favourite(&mut self, favourite: bool) -> &mut Self[src]

A flag that indicates if you want favourite notifications pushed

Example

use elefren::requests::UpdatePushRequest;
let mut request = UpdatePushRequest::new("foobar");
request.favourite(true);

pub fn reblog(&mut self, reblog: bool) -> &mut Self[src]

A flag that indicates if you want reblog notifications pushed

Example

use elefren::requests::UpdatePushRequest;
let mut request = UpdatePushRequest::new("foobar");
request.reblog(true);

pub fn mention(&mut self, mention: bool) -> &mut Self[src]

A flag that indicates if you want mention notifications pushed

Example

use elefren::requests::UpdatePushRequest;
let mut request = UpdatePushRequest::new("foobar");
request.mention(true);

Trait Implementations

impl PartialEq<UpdatePushRequest> for UpdatePushRequest[src]

impl Clone for UpdatePushRequest[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for UpdatePushRequest[src]

impl Debug for UpdatePushRequest[src]

impl Serialize for UpdatePushRequest[src]

Auto Trait Implementations

Blanket Implementations

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

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, 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Err = <U as TryFrom<T>>::Err