Enum mostro_core::message::Message
source · pub enum Message {
Order(MessageKind),
Dispute(MessageKind),
CantDo(MessageKind),
Rate(MessageKind),
}Expand description
Use this Message to establish communication between users and Mostro
Variants§
Implementations§
source§impl Message
impl Message
sourcepub fn new_order(
id: Option<Uuid>,
pubkey: Option<String>,
action: Action,
content: Option<Content>
) -> Self
pub fn new_order( id: Option<Uuid>, pubkey: Option<String>, action: Action, content: Option<Content> ) -> Self
New order message
sourcepub fn new_dispute(
id: Option<Uuid>,
pubkey: Option<String>,
action: Action,
content: Option<Content>
) -> Self
pub fn new_dispute( id: Option<Uuid>, pubkey: Option<String>, action: Action, content: Option<Content> ) -> Self
New dispute message
sourcepub fn cant_do(
id: Option<Uuid>,
pubkey: Option<String>,
content: Option<Content>
) -> Self
pub fn cant_do( id: Option<Uuid>, pubkey: Option<String>, content: Option<Content> ) -> Self
New can’t do template message message
pub fn get_inner_message_kind(&self) -> &MessageKind
pub fn inner_action(&self) -> Option<Action>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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 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