pub struct Order {Show 17 fields
pub id: Option<String>,
pub kind: Option<String>,
pub status: Option<String>,
pub amount: i64,
pub fiat_code: String,
pub min_amount: Option<i64>,
pub max_amount: Option<i64>,
pub fiat_amount: i64,
pub payment_method: String,
pub premium: i64,
pub buyer_trade_pubkey: Option<String>,
pub seller_trade_pubkey: Option<String>,
pub buyer_invoice: Option<String>,
pub created_at: Option<i64>,
pub expires_at: Option<i64>,
pub buyer_token: Option<u16>,
pub seller_token: Option<u16>,
}Fields§
§id: Option<String>§kind: Option<String>§status: Option<String>§amount: i64§fiat_code: String§min_amount: Option<i64>§max_amount: Option<i64>§fiat_amount: i64§payment_method: String§buyer_trade_pubkey: Option<String>§seller_trade_pubkey: Option<String>§buyer_invoice: Option<String>§created_at: Option<i64>§expires_at: Option<i64>§buyer_token: Option<u16>§seller_token: Option<u16>Implementations§
Source§impl Order
impl Order
pub fn set_kind(&mut self, kind: String) -> &mut Self
pub fn set_status(&mut self, status: String) -> &mut Self
pub fn set_amount(&mut self, amount: i64) -> &mut Self
pub fn set_fiat_code(&mut self, fiat_code: String) -> &mut Self
pub fn set_min_amount(&mut self, min_amount: i64) -> &mut Self
pub fn set_max_amount(&mut self, max_amount: i64) -> &mut Self
pub fn set_fiat_amount(&mut self, fiat_amount: i64) -> &mut Self
pub fn set_payment_method(&mut self, payment_method: String) -> &mut Self
pub fn set_buyer_trade_key(&mut self, buyer_trade_pubkey: String) -> &mut Self
pub fn set_seller_trade_key(&mut self, seller_trade_pubkey: String) -> &mut Self
pub async fn save(&self, pool: &SqlitePool) -> Result<(), Box<dyn Error>>
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more