pub struct UserSettings {Show 49 fields
pub display_name: String,
pub biography: String,
pub warning: String,
pub private_profile: bool,
pub theme_preference: ThemePreference,
pub profile_theme: ThemePreference,
pub private_last_seen: bool,
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 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 require_account: bool,
pub show_nsfw: bool,
pub inbox_homepage: bool,
pub muted: Vec<String>,
pub enable_drawings: bool,
pub all_timeline_hide_answers: bool,
pub large_text: bool,
pub disable_achievements: bool,
pub hide_from_social_lists: bool,
pub private_biography: String,
pub hide_social_follows: bool,
pub location: String,
pub links: Vec<(String, String)>,
pub auto_nsfw: bool,
pub auto_limit_posts: bool,
}Fields§
§display_name: String§biography: String§warning: String§private_profile: 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_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§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.
require_account: boolRequire an account to view the user’s profile.
show_nsfw: boolIf NSFW content should be shown.
inbox_homepage: boolMake your inbox your homepage.
muted: Vec<String>A list of strings the user has muted.
enable_drawings: boolIf drawings are enabled for questions sent to the user.
all_timeline_hide_answers: boolHide posts that are answering a question on the “All” timeline.
large_text: boolIncrease the text size of buttons and paragraphs.
disable_achievements: boolDisable achievements.
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).
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.
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.
auto_nsfw: boolAutomatically mark new posts as NSFW.
auto_limit_posts: boolAutomatically limit the reach of new posts (don’t show them on public timelines).
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 · 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,
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