pub struct UserSettings {Show 74 fields
pub display_name: String,
pub biography: String,
pub warning: String,
pub private_profile: bool,
pub private_communities: bool,
pub theme_preference: ThemePreference,
pub profile_theme: ThemePreference,
pub private_last_seen: bool,
pub theme_hue: String,
pub theme_sat: String,
pub theme_lit: String,
pub theme_color_surface: String,
pub theme_color_text: String,
pub theme_color_text_link: String,
pub theme_color_shadow: String,
pub theme_color_lowered: String,
pub theme_color_text_lowered: String,
pub theme_color_super_lowered: String,
pub theme_color_raised: String,
pub theme_color_text_raised: String,
pub theme_color_super_raised: String,
pub theme_color_primary: String,
pub theme_color_text_primary: String,
pub theme_color_primary_lowered: String,
pub theme_color_secondary: String,
pub theme_color_text_secondary: String,
pub theme_color_secondary_lowered: String,
pub theme_custom_css: String,
pub theme_color_online: String,
pub theme_color_idle: String,
pub theme_color_offline: String,
pub disable_other_themes: bool,
pub disable_other_theme_css: bool,
pub enable_questions: bool,
pub motivational_header: String,
pub allow_anonymous_questions: bool,
pub anonymous_username: String,
pub anonymous_avatar_url: String,
pub hide_dislikes: bool,
pub default_timeline: DefaultTimelineChoice,
pub private_chats: bool,
pub private_mails: bool,
pub status: String,
pub banner_mime: String,
pub require_account: bool,
pub show_nsfw: bool,
pub hide_extra_post_tabs: bool,
pub muted: Vec<String>,
pub paged_timelines: bool,
pub enable_drawings: bool,
pub auto_unlist: bool,
pub all_timeline_hide_answers: bool,
pub auto_clear_notifs: bool,
pub large_text: bool,
pub disable_achievements: bool,
pub hide_associated_blocked_users: bool,
pub default_profile_tab: DefaultProfileTabChoice,
pub hide_from_social_lists: bool,
pub auto_full_unlist: bool,
pub private_biography: String,
pub hide_social_follows: bool,
pub mail_signature: String,
pub forum_signature: String,
pub hide_username_badges: bool,
pub use_system_font: bool,
pub location: String,
pub links: Vec<(String, String)>,
pub unround_corners: bool,
pub enable_guestbook: bool,
pub guestbook_require_review: bool,
pub guestbook_motivational_header: String,
pub simplified_profile: bool,
pub maximum_timeline_removed_percentage: f64,
pub disable_views: bool,
}Fields§
§display_name: String§biography: String§warning: String§private_profile: bool§private_communities: bool§theme_preference: ThemePreferenceThe theme shown to the user.
profile_theme: ThemePreferenceThe theme used on the user’s profile. Setting this to Auto will use
the viewing user’s theme_preference setting.
private_last_seen: bool§theme_hue: String§theme_sat: String§theme_lit: String§theme_color_surface: StringPage background.
theme_color_text: StringText on elements with the surface backgrounds.
theme_color_text_link: StringLinks on all elements.
theme_color_shadow: StringBox shadow color.
theme_color_lowered: StringSome cards, buttons, or anything else with a darker background color than the surface.
theme_color_text_lowered: StringText on elements with the lowered backgrounds.
theme_color_super_lowered: StringBorders.
theme_color_raised: StringSome cards, buttons, or anything else with a lighter background color than the surface.
theme_color_text_raised: StringText on elements with the raised backgrounds.
theme_color_super_raised: StringSome borders.
theme_color_primary: StringPrimary color; navigation bar, some buttons, etc.
theme_color_text_primary: StringText on elements with the primary backgrounds.
theme_color_primary_lowered: StringHover state for primary buttons.
theme_color_secondary: StringSecondary color.
theme_color_text_secondary: StringText on elements with the secondary backgrounds.
theme_color_secondary_lowered: StringHover state for secondary buttons.
theme_custom_css: StringCustom CSS input.
theme_color_online: StringThe color of an online online indicator.
theme_color_idle: StringThe color of an idle online indicator.
theme_color_offline: StringThe color of an offline online indicator.
disable_other_themes: bool§disable_other_theme_css: bool§enable_questions: bool§motivational_header: StringA header shown in the place of “Ask question” if enable_questions is true.
allow_anonymous_questions: boolIf questions from anonymous users are allowed. Requires enable_questions.
anonymous_username: StringThe username used for anonymous users.
anonymous_avatar_url: StringThe URL of the avatar used for anonymous users.
hide_dislikes: boolIf dislikes are hidden for the user.
default_timeline: DefaultTimelineChoiceThe timeline that the “Home” button takes you to.
private_chats: boolIf other users that you aren’t following can add you to chats.
private_mails: boolIf other users that you aren’t following can send you letters.
status: StringThe user’s status. Shows over connection info.
The mime type of the user’s banner.
require_account: boolRequire an account to view the user’s profile.
show_nsfw: boolIf NSFW content should be shown.
hide_extra_post_tabs: boolIf extra post tabs are hidden (replies, media).
muted: Vec<String>A list of strings the user has muted.
paged_timelines: boolIf timelines are paged instead of infinitely scrolled.
enable_drawings: boolIf drawings are enabled for questions sent to the user.
auto_unlist: boolAutomatically unlist posts from timelines.
all_timeline_hide_answers: boolHide posts that are answering a question on the “All” timeline.
auto_clear_notifs: boolAutomatically clear all notifications when notifications are viewed.
large_text: boolIncrease the text size of buttons and paragraphs.
disable_achievements: boolDisable achievements.
hide_associated_blocked_users: boolAutomatically hide users that you’ve blocked on your other accounts from your timelines.
default_profile_tab: DefaultProfileTabChoiceWhich tab is shown by default on the user’s profile.
If the user is hidden from followers/following tabs.
The user will still impact the followers/following numbers, but will not be shown in the UI (or API).
auto_full_unlist: boolAutomatically hide your posts from all timelines except your profile and the following timeline.
private_biography: StringBiography shown on profile/private.lisp page.
If the followers/following links are hidden from the user’s profile. Will also revoke access to their respective pages.
mail_signature: StringThe signature automatically attached to new mail letters.
forum_signature: StringThe signature automatically attached to new forum posts.
hide_username_badges: boolHide all badges from your username (everywhere but on profile).
use_system_font: boolIf the user’s system font is always used over Lexend.
location: StringThe user’s location. This isn’t actually verified or anything, so it can really be whatever the user wants.
links: Vec<(String, String)>External links for the user’s other profiles on other websites.
unround_corners: boolUnround corners in the UI (12px->6px).
enable_guestbook: boolAllows anonymous users to post in the user’s “guestbook”.
guestbook_require_review: boolRequire anonymous posts in the guestbook to be sent to the user’s requests before they’re published to the user’s profile.
guestbook_motivational_header: StringA header shown in the place of “Leave a message” in the guestbook.
simplified_profile: boolThe simplified profile removes all profile information. The Tetratto profile is just used to showcase their posts, answers, guestbook, etc.
maximum_timeline_removed_percentage: f64The maximum percentage of removed posts that is acceptable in timelines.
disable_views: boolRemoves post views (from all posts and from your posts for others).
Implementations§
Source§impl UserSettings
impl UserSettings
pub fn verify_values(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for UserSettings
impl Clone for UserSettings
Source§fn clone(&self) -> UserSettings
fn clone(&self) -> UserSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UserSettings
impl Debug for UserSettings
Source§impl Default for UserSettings
impl Default for UserSettings
Source§fn default() -> UserSettings
fn default() -> UserSettings
Source§impl<'de> Deserialize<'de> for UserSettings
impl<'de> Deserialize<'de> for UserSettings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for UserSettings
impl Serialize for UserSettings
Auto Trait Implementations§
impl Freeze for UserSettings
impl RefUnwindSafe for UserSettings
impl Send for UserSettings
impl Sync for UserSettings
impl Unpin for UserSettings
impl UnsafeUnpin for UserSettings
impl UnwindSafe for UserSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FromJsonReader for Twhere
T: DeserializeOwned + Validate,
impl<T> FromJsonReader for Twhere
T: DeserializeOwned + Validate,
Source§impl<'de, T> FromJsonSlice<'de> for Twhere
T: Deserialize<'de> + Validate,
impl<'de, T> FromJsonSlice<'de> for Twhere
T: Deserialize<'de> + Validate,
Source§impl<'de, T> FromJsonStr<'de> for Twhere
T: Deserialize<'de> + Validate,
impl<'de, T> FromJsonStr<'de> for Twhere
T: Deserialize<'de> + Validate,
Source§impl<T> FromJsonValue for Twhere
T: DeserializeOwned + Validate,
impl<T> FromJsonValue for Twhere
T: DeserializeOwned + Validate,
Source§fn from_json_value(value: Value) -> Result<T, Error<Error>>
fn from_json_value(value: Value) -> Result<T, Error<Error>>
serde_json::Value. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more