Struct egg_mode::list::ListUpdate
source · pub struct ListUpdate { /* private fields */ }
Expand description
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();
Implementations§
source§impl ListUpdate
impl ListUpdate
sourcepub fn name(self, name: impl Into<String>) -> ListUpdate
pub fn name(self, name: impl Into<String>) -> ListUpdate
Updates the name of the list.
sourcepub fn public(self, public: bool) -> ListUpdate
pub fn public(self, public: bool) -> ListUpdate
Sets whether the list is public.
sourcepub fn desc(self, desc: String) -> ListUpdate
pub fn desc(self, desc: String) -> ListUpdate
Updates the description of the list.