pub struct Message {
pub ri: ReceiveInfo,
pub ti: TransmitInfo,
pub contents: [u8; 4096],
pub day: i32,
pub week: i32,
pub month: i32,
}
Fields§
§ri: ReceiveInfo
The receiving information
ti: TransmitInfo
The transmitting information
contents: [u8; 4096]
The contents of the message >~4096 bytes
day: i32
day
week: i32
week
month: i32
month
Implementations§
Source§impl Message
impl Message
pub fn empty() -> Self
Sourcepub fn as_string(&self) -> String
pub fn as_string(&self) -> String
Converts the Message
to a String
. This returns a String
following this format:
When a Message
is encrypted, the transmit information and contents should be encrypted
pub fn get_ri_from_encoded(string: &String) -> ReceiveInfo
pub fn ri_as_string(&self) -> String
pub fn ti_as_string(&self) -> String
pub fn encode(&self, encryption: EncryptionInfo) -> String
pub fn decode(string: &String, encryption: EncryptionInfo) -> Self
Sourcepub fn from_string(string: &String) -> Self
pub fn from_string(string: &String) -> Self
Converts an unencrypted String
formatted for Message
s to a new Message
.
Trait Implementations§
impl Copy for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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