Struct mostro_core::order::Order
source · pub struct Order {Show 36 fields
pub id: Uuid,
pub kind: String,
pub event_id: String,
pub hash: Option<String>,
pub preimage: Option<String>,
pub creator_pubkey: String,
pub cancel_initiator_pubkey: Option<String>,
pub buyer_pubkey: Option<String>,
pub master_buyer_pubkey: Option<String>,
pub seller_pubkey: Option<String>,
pub master_seller_pubkey: Option<String>,
pub status: String,
pub price_from_api: bool,
pub premium: i64,
pub payment_method: String,
pub amount: i64,
pub min_amount: Option<i64>,
pub max_amount: Option<i64>,
pub buyer_dispute: bool,
pub seller_dispute: bool,
pub buyer_cooperativecancel: bool,
pub seller_cooperativecancel: bool,
pub fee: i64,
pub routing_fee: i64,
pub fiat_code: String,
pub fiat_amount: i64,
pub buyer_invoice: Option<String>,
pub range_parent_id: Option<Uuid>,
pub invoice_held_at: i64,
pub taken_at: i64,
pub created_at: i64,
pub buyer_sent_rate: bool,
pub seller_sent_rate: bool,
pub failed_payment: bool,
pub payment_attempts: i64,
pub expires_at: i64,
}Expand description
Database representation of an order
Fields§
§id: Uuid§kind: String§event_id: String§hash: Option<String>§preimage: Option<String>§creator_pubkey: String§cancel_initiator_pubkey: Option<String>§buyer_pubkey: Option<String>§master_buyer_pubkey: Option<String>§seller_pubkey: Option<String>§master_seller_pubkey: Option<String>§status: String§price_from_api: bool§payment_method: String§amount: i64§min_amount: Option<i64>§max_amount: Option<i64>§buyer_dispute: bool§seller_dispute: bool§buyer_cooperativecancel: bool§seller_cooperativecancel: bool§fee: i64§routing_fee: i64§fiat_code: String§fiat_amount: i64§buyer_invoice: Option<String>§range_parent_id: Option<Uuid>§invoice_held_at: i64§taken_at: i64§created_at: i64§buyer_sent_rate: bool§seller_sent_rate: bool§failed_payment: bool§payment_attempts: i64§expires_at: i64Implementations§
source§impl Order
impl Order
pub fn as_new_order(&self) -> SmallOrder
pub fn is_range_order(&self) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for Order
impl<'de> Deserialize<'de> for Order
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 Order
impl RefUnwindSafe for Order
impl Send for Order
impl Sync for Order
impl Unpin for Order
impl UnwindSafe for Order
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