pub struct Message {
pub destination_hash: Option<[u8; 16]>,
pub source_hash: Option<[u8; 16]>,
pub signature: Option<[u8; 64]>,
pub content: Vec<u8>,
pub title: Vec<u8>,
pub fields: Option<Value>,
pub stamp: Option<Vec<u8>>,
pub timestamp: Option<f64>,
/* private fields */
}Fields§
§destination_hash: Option<[u8; 16]>§source_hash: Option<[u8; 16]>§signature: Option<[u8; 64]>§content: Vec<u8>§title: Vec<u8>§fields: Option<Value>§stamp: Option<Vec<u8>>§timestamp: Option<f64>Implementations§
Source§impl Message
impl Message
pub fn new() -> Self
pub fn set_state(&mut self, state: State)
pub fn is_outbound(&self) -> bool
pub fn set_title_from_string(&mut self, title: &str)
pub fn set_title_from_bytes(&mut self, title: &[u8])
pub fn title_as_string(&self) -> Option<String>
pub fn set_content_from_string(&mut self, content: &str)
pub fn set_content_from_bytes(&mut self, content: &[u8])
pub fn set_stamp_from_bytes(&mut self, stamp: &[u8])
pub fn stamp_bytes(&self) -> Option<Vec<u8>>
pub fn content_as_string(&self) -> Option<String>
pub fn from_wire(bytes: &[u8]) -> Result<Self, LxmfError>
pub fn to_wire( &self, signer: Option<&PrivateIdentity>, ) -> Result<Vec<u8>, LxmfError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin 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