Files
ojrc/rc_social_room/src/data/friend.rs
T

19 lines
540 B
Rust
Raw Normal View History

use polariton::operation::Typed;
pub struct AvatarInfo {
pub name: String,
pub use_custom_avatar: bool,
pub avatar_id: i32,
}
impl AvatarInfo {
2025-03-08 17:16:02 -05:00
pub fn as_transmissible<C>(&self) -> Typed<C> {
Typed::HashMap(vec![
(Typed::Str("name".into()), Typed::Str(self.name.clone().into())),
2025-09-03 22:33:26 -04:00
(Typed::Str("useCustomAvatar".into()), Typed::Bool(self.use_custom_avatar)),
(Typed::Str("avatarId".into()), Typed::Int(self.avatar_id)),
].into())
}
}
// TODO pub struct FriendInfo {}