pub struct ChatMessage { /* private fields */ }Implementations§
Source§impl ChatMessage
impl ChatMessage
Sourcepub fn deserialize<R: Read>(r: &mut R) -> Result<ClientboundPacket>
pub fn deserialize<R: Read>(r: &mut R) -> Result<ClientboundPacket>
Deserializes a Read type into a packet. You usually won’t need to use this.
Sourcepub fn to_u8(&self) -> Result<Vec<u8>>
pub fn to_u8(&self) -> Result<Vec<u8>>
Serializes the packet into Vec
pub fn new(chat: String, position: u8) -> ClientboundPacket
Sourcepub fn get_chat(&self) -> &String
pub fn get_chat(&self) -> &String
Get the raw JSON data of the chat message. See also ozelot::utils::chat_to_str
Sourcepub fn get_position(&self) -> &u8
pub fn get_position(&self) -> &u8
Get the position of the chat message (enum)
Trait Implementations§
Source§impl Clone for ChatMessage
impl Clone for ChatMessage
Source§fn clone(&self) -> ChatMessage
fn clone(&self) -> ChatMessage
Returns a duplicate 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 ChatMessage
impl Debug for ChatMessage
Source§impl PartialEq for ChatMessage
impl PartialEq for ChatMessage
impl StructuralPartialEq for ChatMessage
Auto Trait Implementations§
impl Freeze for ChatMessage
impl RefUnwindSafe for ChatMessage
impl Send for ChatMessage
impl Sync for ChatMessage
impl Unpin for ChatMessage
impl UnsafeUnpin for ChatMessage
impl UnwindSafe for ChatMessage
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