pub struct UserService { /* private fields */ }Expand description
用户服务
Implementations§
Source§impl UserService
impl UserService
Sourcepub fn new(http: Arc<HttpClient>) -> Self
pub fn new(http: Arc<HttpClient>) -> Self
创建新的用户服务
Sourcepub async fn get_privacy_settings(&self) -> SdkResult<UserPrivacySettings>
pub async fn get_privacy_settings(&self) -> SdkResult<UserPrivacySettings>
Sourcepub async fn update_privacy_settings(
&self,
settings: &UpdatePrivacySettingsRequest,
) -> SdkResult<UserPrivacySettings>
pub async fn update_privacy_settings( &self, settings: &UpdatePrivacySettingsRequest, ) -> SdkResult<UserPrivacySettings>
Sourcepub async fn get_blacklist(&self) -> SdkResult<Vec<BlacklistEntry>>
pub async fn get_blacklist(&self) -> SdkResult<Vec<BlacklistEntry>>
Sourcepub async fn add_to_blacklist(
&self,
blocked_user_id: &str,
reason: Option<&str>,
) -> SdkResult<BlacklistEntry>
pub async fn add_to_blacklist( &self, blocked_user_id: &str, reason: Option<&str>, ) -> SdkResult<BlacklistEntry>
Auto Trait Implementations§
impl Freeze for UserService
impl !RefUnwindSafe for UserService
impl Send for UserService
impl Sync for UserService
impl Unpin for UserService
impl UnsafeUnpin for UserService
impl !UnwindSafe for UserService
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
Mutably borrows from an owned value. Read more