pub struct MiniMessage<const TITLE: usize, const CONTENT: usize> {
pub destination: [u8; 16],
pub source: [u8; 16],
pub signature: [u8; 64],
pub timestamp: u64,
pub title: Vec<u8, TITLE>,
pub content: Vec<u8, CONTENT>,
}Fields§
§destination: [u8; 16]§source: [u8; 16]§signature: [u8; 64]§timestamp: u64§title: Vec<u8, TITLE>§content: Vec<u8, CONTENT>Implementations§
Source§impl<const TITLE: usize, const CONTENT: usize> MiniMessage<TITLE, CONTENT>
impl<const TITLE: usize, const CONTENT: usize> MiniMessage<TITLE, CONTENT>
pub fn new( destination: [u8; 16], source: [u8; 16], signature: [u8; 64], timestamp: f64, title: &[u8], content: &[u8], ) -> MiniResult<Self>
pub fn timestamp(&self) -> f64
pub fn encoded_len(&self) -> MiniResult<usize>
pub fn encode(&self, out: &mut [u8]) -> MiniResult<usize>
pub fn decode(bytes: &[u8]) -> MiniResult<Self>
Trait Implementations§
Source§impl<const TITLE: usize, const CONTENT: usize> Clone for MiniMessage<TITLE, CONTENT>
impl<const TITLE: usize, const CONTENT: usize> Clone for MiniMessage<TITLE, CONTENT>
Source§fn clone(&self) -> MiniMessage<TITLE, CONTENT>
fn clone(&self) -> MiniMessage<TITLE, CONTENT>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<const TITLE: usize, const CONTENT: usize> Eq for MiniMessage<TITLE, CONTENT>
Source§impl<const TITLE: usize, const CONTENT: usize> PartialEq for MiniMessage<TITLE, CONTENT>
impl<const TITLE: usize, const CONTENT: usize> PartialEq for MiniMessage<TITLE, CONTENT>
Source§fn eq(&self, other: &MiniMessage<TITLE, CONTENT>) -> bool
fn eq(&self, other: &MiniMessage<TITLE, CONTENT>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<const TITLE: usize, const CONTENT: usize> StructuralPartialEq for MiniMessage<TITLE, CONTENT>
Auto Trait Implementations§
impl<const TITLE: usize, const CONTENT: usize> Freeze for MiniMessage<TITLE, CONTENT>
impl<const TITLE: usize, const CONTENT: usize> RefUnwindSafe for MiniMessage<TITLE, CONTENT>
impl<const TITLE: usize, const CONTENT: usize> Send for MiniMessage<TITLE, CONTENT>
impl<const TITLE: usize, const CONTENT: usize> Sync for MiniMessage<TITLE, CONTENT>
impl<const TITLE: usize, const CONTENT: usize> Unpin for MiniMessage<TITLE, CONTENT>
impl<const TITLE: usize, const CONTENT: usize> UnsafeUnpin for MiniMessage<TITLE, CONTENT>
impl<const TITLE: usize, const CONTENT: usize> UnwindSafe for MiniMessage<TITLE, CONTENT>
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