Enum MessageType
pub enum MessageType {
Basic,
Status,
ResendRequest,
MessageUnavailable,
Extension(u8),
}Expand description
Text-message rendering/control type.
The type space is open: the base specification defines values 0–3, and extensions (such as chat-room system events) define more. Unrecognized values are preserved rather than rejected.
Variants§
Basic
Status
ResendRequest
Extension(u8)
A message type outside the base range, preserved for profile-specific validation. Never constructed with values 0–3.
Implementations§
§impl MessageType
impl MessageType
pub fn from_byte(value: u8) -> MessageType
pub fn to_byte(self) -> u8
pub fn is_control(self) -> bool
pub fn is_control(self) -> bool
True for the control types that are not displayable content.
Trait Implementations§
§impl Clone for MessageType
impl Clone for MessageType
§fn clone(&self) -> MessageType
fn clone(&self) -> MessageType
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for MessageType
impl Debug for MessageType
§impl PartialEq for MessageType
impl PartialEq for MessageType
impl Copy for MessageType
impl Eq for MessageType
impl StructuralPartialEq for MessageType
Auto Trait Implementations§
impl Freeze for MessageType
impl RefUnwindSafe for MessageType
impl Send for MessageType
impl Sync for MessageType
impl Unpin for MessageType
impl UnwindSafe for MessageType
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)