[][src]Struct egg_mode::list::ListUpdate

pub struct ListUpdate { /* fields omitted */ }

Represents a pending update to a list's metadata.

As updating a list could modify each field independently, this operation is exposed as a builder struct. To update any field, call the method named after that field, then call send to send the update to Twitter.

Example

use egg_mode::list::{self, ListID};

//remember, you can only update a list if you own it!
let update = list::update(ListID::from_slug("Twitter", "support"));
let list = update.name("Official Support").send(&token).await.unwrap();

Methods

impl ListUpdate[src]

pub fn name(self, name: impl Into<String>) -> ListUpdate[src]

Updates the name of the list.

pub fn public(self, public: bool) -> ListUpdate[src]

Sets whether the list is public.

pub fn desc(self, desc: String) -> ListUpdate[src]

Updates the description of the list.

pub async fn send<'_>(self, token: &'_ Token) -> Result<Response<List>, Error>[src]

Sends the update request to Twitter.

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,