Struct mostro_core::message::MessageKind
source · pub struct MessageKind {
pub version: u8,
pub id: Option<Uuid>,
pub pubkey: Option<String>,
pub action: Action,
pub content: Option<Content>,
}Expand description
Use this Message to establish communication between users and Mostro
Fields§
§version: u8Message version
id: Option<Uuid>Message id is not mandatory
pubkey: Option<String>Real pubkey of the user hidden in the encrypted message, used with ephemeral identities
action: ActionAction to be taken
content: Option<Content>Message content
Implementations§
source§impl MessageKind
impl MessageKind
sourcepub fn new(
id: Option<Uuid>,
pubkey: Option<String>,
action: Action,
content: Option<Content>
) -> Self
pub fn new( id: Option<Uuid>, pubkey: Option<String>, action: Action, content: Option<Content> ) -> Self
New message
pub fn get_action(&self) -> Action
pub fn get_order(&self) -> Option<&SmallOrder>
pub fn get_payment_request(&self) -> Option<String>
pub fn get_content(&self) -> Option<&Content>
Trait Implementations§
source§impl Debug for MessageKind
impl Debug for MessageKind
source§impl<'de> Deserialize<'de> for MessageKind
impl<'de> Deserialize<'de> for MessageKind
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for MessageKind
impl Send for MessageKind
impl Sync for MessageKind
impl Unpin for MessageKind
impl UnwindSafe for MessageKind
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