pub struct UserStatus(/* private fields */);
Expand description
UserStatus is a struct that holds status of user.
This packet is used to transmit sender’s status to a friend. Every time a friend become online or my status is changed, this packet is sent to the friend or to all friends of mine.
Serialized form:
Length | Content |
---|---|
1 | 0x32 |
1 | My status(0 = online, 1 = away, 2 = busy) |
Implementations§
Source§impl UserStatus
impl UserStatus
Sourcepub fn new(status: PeerStatus) -> Self
pub fn new(status: PeerStatus) -> Self
Create new UserStatus object.
Trait Implementations§
Source§impl Clone for UserStatus
impl Clone for UserStatus
Source§fn clone(&self) -> UserStatus
fn clone(&self) -> UserStatus
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UserStatus
impl Debug for UserStatus
Source§impl FromBytes for UserStatus
impl FromBytes for UserStatus
Source§fn from_bytes(i: &[u8]) -> IResult<&[u8], UserStatus, (&[u8], ErrorKind)>
fn from_bytes(i: &[u8]) -> IResult<&[u8], UserStatus, (&[u8], ErrorKind)>
Deserialize struct using
nom
from raw bytesSource§impl PartialEq for UserStatus
impl PartialEq for UserStatus
Source§impl ToBytes for UserStatus
impl ToBytes for UserStatus
impl Copy for UserStatus
impl Eq for UserStatus
impl StructuralPartialEq for UserStatus
Auto Trait Implementations§
impl Freeze for UserStatus
impl RefUnwindSafe for UserStatus
impl Send for UserStatus
impl Sync for UserStatus
impl Unpin for UserStatus
impl UnwindSafe for UserStatus
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