pub struct User {
pub chatroom: ChatRoom,
pub chat: Chat,
pub breezemoon: BreezeMoon,
pub article: Article,
pub notice: Notice,
pub redpacket: Redpacket,
pub comment: Comment,
/* private fields */
}Fields§
§chatroom: ChatRoom§chat: Chat§breezemoon: BreezeMoon§article: Article§notice: Notice§redpacket: Redpacket§comment: CommentImplementations§
Source§impl User
impl User
pub fn new(api_key: String) -> Self
pub fn get_token(&self) -> &str
pub fn is_logined(&self) -> bool
Sourcepub async fn is_checkin(&self) -> Result<bool, Error>
pub async fn is_checkin(&self) -> Result<bool, Error>
检查用户是否已经签到
Sourcepub async fn is_collected_liveness(&self) -> Result<bool, Error>
pub async fn is_collected_liveness(&self) -> Result<bool, Error>
检查用户是否领取昨日活跃奖励
Sourcepub async fn reward_liveness(&self) -> Result<u32, Error>
pub async fn reward_liveness(&self) -> Result<u32, Error>
领取昨日活跃度奖励
Sourcepub async fn transfer(
&self,
username: &str,
amount: u32,
memo: &str,
) -> Result<bool, Error>
pub async fn transfer( &self, username: &str, amount: u32, memo: &str, ) -> Result<bool, Error>
转账
Sourcepub async fn update_user_info(
&self,
params: UpdateUserInfoParams,
) -> Result<bool, Error>
pub async fn update_user_info( &self, params: UpdateUserInfoParams, ) -> Result<bool, Error>
Sourcepub async fn get_user(&self, username: &str) -> Result<UserInfo, Error>
pub async fn get_user(&self, username: &str) -> Result<UserInfo, Error>
获取用户信息
username用户名
返回用户信息
Auto Trait Implementations§
impl Freeze for User
impl !RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnsafeUnpin for User
impl !UnwindSafe for User
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