MeUpdateBuilder

Struct MeUpdateBuilder 

Source
pub struct MeUpdateBuilder<C> { /* private fields */ }
Expand description

Builder for the update_me method.

Implementations§

Source§

impl<C> MeUpdateBuilder<C>

Source

pub fn new(client: C) -> Self

Creates a builder with the client.

Source

pub fn as_request(&self) -> &Request

Gets the request object for reuse.

Source

pub fn set_name(&mut self, name: impl Into<String>) -> &mut Self

Sets the name.

Source

pub fn delete_name(&mut self) -> &mut Self

Deletes the name.

Source

pub fn set_description(&mut self, description: impl Into<String>) -> &mut Self

Sets the description.

Source

pub fn delete_description(&mut self) -> &mut Self

Deletes the description.

Source

pub fn set_language(&mut self, language: impl Into<String>) -> &mut Self

Sets the language.

Source

pub fn delete_language(&mut self) -> &mut Self

Deletes the language.

Source

pub fn set_location(&mut self, location: impl Into<String>) -> &mut Self

Sets the location.

Source

pub fn delete_location(&mut self) -> &mut Self

Deletes the location.

Source

pub fn set_birthday(&mut self, birthday: impl Into<String>) -> &mut Self

Sets the birthday.

Source

pub fn delete_birthday(&mut self) -> &mut Self

Deletes the birthday.

Source

pub fn set_avatar(&mut self, avatar: impl EntityRef<DriveFile>) -> &mut Self

Sets the avatar.

Source

pub fn delete_avatar(&mut self) -> &mut Self

Deletes the avatar.

Source

pub fn set_banner(&mut self, banner: impl EntityRef<DriveFile>) -> &mut Self

Sets the banner.

Source

pub fn delete_banner(&mut self) -> &mut Self

Deletes the banner.

Source

pub fn set_pinned_page( &mut self, pinned_page: impl EntityRef<Page>, ) -> &mut Self

Sets the pinned page.

Source

pub fn delete_pinned_page(&mut self) -> &mut Self

Deletes the pinned page.

Source

pub fn set_fields(&mut self, fields: impl IntoUserFields) -> &mut Self

Sets the fields in this user’s profile.

Since the user has four fields, it takes an array of length 1 to 4 as its argument.

§Examples
client
    .update_me()
    .set_fields([
        ("Website", "https://example.com/"),
        ("Twitter", "@username"),
    ])
    .update()
    .await?;
Source

pub fn delete_fields(&mut self) -> &mut Self

Deletes all the fields in this user’s profile.

Source

pub fn locked(&mut self, locked: bool) -> &mut Self

Sets whether this user is locked or not.

Source

pub fn explorable(&mut self, explorable: bool) -> &mut Self

Available on crate feature 12-63-0 only.

Sets whether this user is visible in “Explore” section of the instance.

Source

pub fn require_follow_request_for_bot( &mut self, require_follow_request_for_bot: bool, ) -> &mut Self

Sets whether this user requires a follow request from bots.

Source

pub fn auto_accept_followed(&mut self, auto_accept_followed: bool) -> &mut Self

Sets whether to automatically accept follow requests from following users.

Source

pub fn bot(&mut self, bot: bool) -> &mut Self

Sets whether to display this user as a bot.

Source

pub fn cat(&mut self, cat: bool) -> &mut Self

Sets whether to display this user as a cot.

Sets whether to display featured notes in the timeline.

Source

pub fn always_mark_nsfw(&mut self, always_mark_nsfw: bool) -> &mut Self

Sets whether to mark uploaded media as NSFW by default.

Source

pub fn auto_watch(&mut self, auto_watch: bool) -> &mut Self

Available on non-crate feature 12-55-0 only.

Sets whether to receive notifications about other users’ notes that this user has reacted to or replied to.

Source

pub fn no_crawle(&mut self, no_crawle: bool) -> &mut Self

Available on crate feature 12-60-0 only.

Sets whether to ask search engines not to index this user’s contents.

Source

pub fn muted_words( &mut self, muted_words: impl Into<Query<String>>, ) -> &mut Self

Sets the muted words for this user.

Source§

impl<C: Client> MeUpdateBuilder<C>

Source

pub async fn update(&self) -> Result<User, Error<C::Error>>

Updates the user.

Auto Trait Implementations§

§

impl<C> Freeze for MeUpdateBuilder<C>
where C: Freeze,

§

impl<C> RefUnwindSafe for MeUpdateBuilder<C>
where C: RefUnwindSafe,

§

impl<C> Send for MeUpdateBuilder<C>
where C: Send,

§

impl<C> Sync for MeUpdateBuilder<C>
where C: Sync,

§

impl<C> Unpin for MeUpdateBuilder<C>
where C: Unpin,

§

impl<C> UnwindSafe for MeUpdateBuilder<C>
where C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,